Package org.keycloak.adapters.undertow
Class AbstractUndertowKeycloakAuthMech
java.lang.Object
org.keycloak.adapters.undertow.AbstractUndertowKeycloakAuthMech
- All Implemented Interfaces:
io.undertow.security.api.AuthenticationMechanism
- Direct Known Subclasses:
ServletKeycloakAuthMech,UndertowAuthenticationMechanism
public abstract class AbstractUndertowKeycloakAuthMech
extends Object
implements io.undertow.security.api.AuthenticationMechanism
Abstract base class for a Keycloak-enabled Undertow AuthenticationMechanism.
- Author:
- Stan Silvert ssilvert@redhat.com (C) 2014 Red Hat Inc.
-
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 -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AdapterDeploymentContextprotected Stringstatic final io.undertow.util.AttachmentKey<AuthChallenge>protected UndertowUserSessionManagement -
Constructor Summary
ConstructorsConstructorDescriptionAbstractUndertowKeycloakAuthMech(AdapterDeploymentContext deploymentContext, UndertowUserSessionManagement sessionManagement, String errorPage) -
Method Summary
Modifier and TypeMethodDescriptioncreateFacade(io.undertow.server.HttpServerExchange exchange) protected AdapterTokenStoregetTokenStore(io.undertow.server.HttpServerExchange exchange, HttpFacade facade, KeycloakDeployment deployment, io.undertow.security.api.SecurityContext securityContext) protected io.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcomekeycloakAuthenticate(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext, RequestAuthenticator authenticator) Call this inside your authenticate method.protected voidregisterNotifications(io.undertow.security.api.SecurityContext securityContext) io.undertow.security.api.AuthenticationMechanism.ChallengeResultsendChallenge(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext) protected IntegerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.undertow.security.api.AuthenticationMechanism
authenticate
-
Field Details
-
KEYCLOAK_CHALLENGE_ATTACHMENT_KEY
-
deploymentContext
-
sessionManagement
-
errorPage
-
-
Constructor Details
-
AbstractUndertowKeycloakAuthMech
public AbstractUndertowKeycloakAuthMech(AdapterDeploymentContext deploymentContext, UndertowUserSessionManagement sessionManagement, String errorPage)
-
-
Method Details
-
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
-
createFacade
-
servePage
-
registerNotifications
protected void registerNotifications(io.undertow.security.api.SecurityContext securityContext) -
keycloakAuthenticate
protected io.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcome keycloakAuthenticate(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext, RequestAuthenticator authenticator) Call this inside your authenticate method. -
getTokenStore
protected AdapterTokenStore getTokenStore(io.undertow.server.HttpServerExchange exchange, HttpFacade facade, KeycloakDeployment deployment, io.undertow.security.api.SecurityContext securityContext)
-