Package org.restheart.security.handlers
Class AuthenticatorMechanismWrapper
java.lang.Object
org.restheart.security.handlers.AuthenticatorMechanismWrapper
- All Implemented Interfaces:
io.undertow.security.api.AuthenticationMechanism,ConfigurablePlugin,Plugin,AuthMechanism
log the wapped AuthenticatorMechanism outcomes and makes sure that it can't
fail the whole authetication process if it doesn't authenticate the request.
when multiple AuthenticatorMechanism are defined, the standard undertow
authentication process is:
As an in-bound request is received the authenticate method is called on each
mechanism in turn until one of the following occurs:
- A mechanism successfully authenticates the incoming request.
- A mechanism attempts but fails to authenticate the request.
- The list of mechanisms is exhausted. * See http://undertow.io/javadoc/2.0.x/io/undertow/security/api/AuthenticationMechanism.html The restheart-security process is: As an in-bound request is received the authenticate method is called on each mechanism in turn until one of the following occurs:
- A mechanism successfully authenticates the incoming request.
- The list of mechanisms is exhausted.
this is achieved avoiding the wrapper AuthenticationMechanism to return NOT_AUTHENTICATED replacing the return value with NOT_ATTEMPTED
- A mechanism successfully authenticates the incoming request.
- A mechanism attempts but fails to authenticate the request.
- The list of mechanisms is exhausted. * See http://undertow.io/javadoc/2.0.x/io/undertow/security/api/AuthenticationMechanism.html The restheart-security process is: As an in-bound request is received the authenticate method is called on each mechanism in turn until one of the following occurs:
- A mechanism successfully authenticates the incoming request.
- The list of mechanisms is exhausted.
this is achieved avoiding the wrapper AuthenticationMechanism to return NOT_AUTHENTICATED replacing the return value with NOT_ATTEMPTED
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.undertow.security.api.AuthenticationMechanism
io.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcome, io.undertow.security.api.AuthenticationMechanism.ChallengeResult -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcomeauthenticate(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext) io.undertow.security.api.AuthenticationMechanism.ChallengeResultsendChallenge(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.restheart.plugins.ConfigurablePlugin
arg, argOrDefault
-
Constructor Details
-
AuthenticatorMechanismWrapper
-
-
Method Details
-
authenticate
public io.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcome authenticate(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext) - Specified by:
authenticatein interfaceio.undertow.security.api.AuthenticationMechanism- Specified by:
authenticatein interfaceAuthMechanism
-
sendChallenge
public io.undertow.security.api.AuthenticationMechanism.ChallengeResult sendChallenge(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext) - Specified by:
sendChallengein interfaceio.undertow.security.api.AuthenticationMechanism- Specified by:
sendChallengein interfaceAuthMechanism
-
getMechanismName
- Specified by:
getMechanismNamein interfaceAuthMechanism
-