Package org.mockserver.authentication
Class ChainedAuthenticationHandler
java.lang.Object
org.mockserver.authentication.ChainedAuthenticationHandler
- All Implemented Interfaces:
AuthenticationHandler
-
Constructor Summary
ConstructorsConstructorDescriptionChainedAuthenticationHandler(AuthenticationHandler... authenticationHandlers) -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(HttpRequest request) Runs every delegate'sAuthenticationHandler.authenticate(org.mockserver.model.HttpRequest)(preserving the AND semantics: any unauthenticated delegate fails the whole chain).booleanLegacy boolean SPI: returns true if the control-plane request is authenticated.
-
Constructor Details
-
ChainedAuthenticationHandler
-
-
Method Details
-
controlPlaneRequestAuthenticated
Description copied from interface:AuthenticationHandlerLegacy boolean SPI: returns true if the control-plane request is authenticated. Implementations may throwAuthenticationExceptionto signal a 401 with a specific reason. Existing and third-party handlers implement only this method.- Specified by:
controlPlaneRequestAuthenticatedin interfaceAuthenticationHandler
-
authenticate
Runs every delegate'sAuthenticationHandler.authenticate(org.mockserver.model.HttpRequest)(preserving the AND semantics: any unauthenticated delegate fails the whole chain). When all delegates authenticate, returns a combined result that takes the FIRST verified principal (so an OIDC/JWT delegate's principal wins over an mTLS-only delegate that has a null principal) and unions every delegate's scopes.- Specified by:
authenticatein interfaceAuthenticationHandler
-