Class IdentityAuthMechanism
java.lang.Object
org.restheart.security.mechanisms.IdentityAuthMechanism
- All Implemented Interfaces:
io.undertow.security.api.AuthenticationMechanism,org.restheart.plugins.ConfigurablePlugin,org.restheart.plugins.Plugin,org.restheart.plugins.security.AuthMechanism
public class IdentityAuthMechanism
extends Object
implements org.restheart.plugins.security.AuthMechanism
a simple Auth Mechanism to demonstrate how to plug a custom
AuthenticationMechanism
it authenticates all requests against the configured IdentityManager using
the credentials specified in the configuration file
- 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) voidinit()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
getMechanismNameMethods inherited from interface org.restheart.plugins.ConfigurablePlugin
arg, argOrDefault
-
Constructor Details
-
IdentityAuthMechanism
public IdentityAuthMechanism()
-
-
Method Details
-
init
public void init() throws org.restheart.configuration.ConfigurationException- Throws:
org.restheart.configuration.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 interfaceorg.restheart.plugins.security.AuthMechanism
-
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 interfaceorg.restheart.plugins.security.AuthMechanism
-