Class AbstractSamlAuthMech
- java.lang.Object
-
- org.keycloak.adapters.saml.undertow.AbstractSamlAuthMech
-
- All Implemented Interfaces:
io.undertow.security.api.AuthenticationMechanism
- Direct Known Subclasses:
ServletSamlAuthMech
public abstract class AbstractSamlAuthMech 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.
-
-
Field Summary
Fields Modifier and Type Field Description protected SamlDeploymentContextdeploymentContextprotected StringerrorPagestatic io.undertow.util.AttachmentKey<AuthChallenge>KEYCLOAK_CHALLENGE_ATTACHMENT_KEYprotected UndertowUserSessionManagementsessionManagement
-
Constructor Summary
Constructors Constructor Description AbstractSamlAuthMech(SamlDeploymentContext deploymentContext, UndertowUserSessionManagement sessionManagement, String errorPage)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description io.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcomeauthenticate(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext)Call this inside your authenticate method.protected UndertowHttpFacadecreateFacade(io.undertow.server.HttpServerExchange exchange)protected abstract SamlSessionStoregetTokenStore(io.undertow.server.HttpServerExchange exchange, HttpFacade facade, SamlDeployment deployment, io.undertow.security.api.SecurityContext securityContext)protected voidredirectLogout(SamlDeployment deployment, io.undertow.server.HttpServerExchange exchange)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 IntegerservePage(io.undertow.server.HttpServerExchange exchange, String location)
-
-
-
Field Detail
-
KEYCLOAK_CHALLENGE_ATTACHMENT_KEY
public static final io.undertow.util.AttachmentKey<AuthChallenge> KEYCLOAK_CHALLENGE_ATTACHMENT_KEY
-
deploymentContext
protected SamlDeploymentContext deploymentContext
-
sessionManagement
protected UndertowUserSessionManagement sessionManagement
-
errorPage
protected String errorPage
-
-
Constructor Detail
-
AbstractSamlAuthMech
public AbstractSamlAuthMech(SamlDeploymentContext deploymentContext, UndertowUserSessionManagement sessionManagement, String errorPage)
-
-
Method Detail
-
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
-
servePage
protected Integer servePage(io.undertow.server.HttpServerExchange exchange, String location)
-
registerNotifications
protected void registerNotifications(io.undertow.security.api.SecurityContext securityContext)
-
authenticate
public io.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcome authenticate(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext)Call this inside your authenticate method.- Specified by:
authenticatein interfaceio.undertow.security.api.AuthenticationMechanism
-
redirectLogout
protected void redirectLogout(SamlDeployment deployment, io.undertow.server.HttpServerExchange exchange)
-
createFacade
protected UndertowHttpFacade createFacade(io.undertow.server.HttpServerExchange exchange)
-
getTokenStore
protected abstract SamlSessionStore getTokenStore(io.undertow.server.HttpServerExchange exchange, HttpFacade facade, SamlDeployment deployment, io.undertow.security.api.SecurityContext securityContext)
-
-