Class TokenBasicAuthMechanism
java.lang.Object
io.undertow.security.impl.BasicAuthenticationMechanism
org.restheart.security.mechanisms.TokenBasicAuthMechanism
- All Implemented Interfaces:
io.undertow.security.api.AuthenticationMechanism,ConfigurablePlugin,Plugin,AuthMechanism
public class TokenBasicAuthMechanism
extends io.undertow.security.impl.BasicAuthenticationMechanism
implements AuthMechanism
- Author:
- Andrea Di Cesare <andrea@softinstigate.com> this extends the undertow BasicAuthenticationMechanism and authenticates requests using AuthTokenIdentityManager. if user already authenticated via a different mechanism, a token is generated so that later calls can be use the token instead of the actual password
-
Nested Class Summary
Nested classes/interfaces inherited from class io.undertow.security.impl.BasicAuthenticationMechanism
io.undertow.security.impl.BasicAuthenticationMechanism.FactoryNested classes/interfaces inherited from interface io.undertow.security.api.AuthenticationMechanism
io.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcome, io.undertow.security.api.AuthenticationMechanism.ChallengeResult -
Field Summary
Fields inherited from class io.undertow.security.impl.BasicAuthenticationMechanism
CHARSET, FACTORY, SILENT, USER_AGENT_CHARSETS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcomeauthenticate(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext) voidinit(PluginsRegistry pluginsRegistry) 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.security.AuthMechanism
getMechanismName
-
Constructor Details
-
TokenBasicAuthMechanism
- Throws:
ConfigurationException
-
-
Method Details
-
init
- Throws:
ConfigurationException
-
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- Overrides:
authenticatein classio.undertow.security.impl.BasicAuthenticationMechanism
-
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- Overrides:
sendChallengein classio.undertow.security.impl.BasicAuthenticationMechanism
-