Package io.undertow.security.impl
Class SingleSignOnAuthenticationMechanism
java.lang.Object
io.undertow.security.impl.SingleSignOnAuthenticationMechanism
- All Implemented Interfaces:
AuthenticationMechanism
Authenticator that can be used to configure single sign on.
- Author:
- Stuart Douglas, Paul Ferraro, Richard Opalka
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.undertow.security.api.AuthenticationMechanism
AuthenticationMechanism.AuthenticationMechanismOutcome, AuthenticationMechanism.ChallengeResult
-
Constructor Summary
ConstructorsConstructorDescriptionSingleSignOnAuthenticationMechanism
(SingleSignOnManager storage, IdentityManager identityManager) -
Method Summary
Modifier and TypeMethodDescriptionauthenticate
(HttpServerExchange exchange, SecurityContext securityContext) Perform authentication of the request.getPath()
protected Session
getSession
(HttpServerExchange exchange) boolean
boolean
isSecure()
sendChallenge
(HttpServerExchange exchange, SecurityContext securityContext) Send an authentication challenge to the remote client.setCookieName
(String cookieName) setHttpOnly
(boolean httpOnly) setSecure
(boolean secure)
-
Constructor Details
-
SingleSignOnAuthenticationMechanism
-
SingleSignOnAuthenticationMechanism
public SingleSignOnAuthenticationMechanism(SingleSignOnManager storage, IdentityManager identityManager)
-
-
Method Details
-
authenticate
public AuthenticationMechanism.AuthenticationMechanismOutcome authenticate(HttpServerExchange exchange, SecurityContext securityContext) Description copied from interface:AuthenticationMechanism
Perform authentication of the request. Any potentially blocking work should be performed in the handoff executor provided- Specified by:
authenticate
in interfaceAuthenticationMechanism
- Parameters:
exchange
- The exchange- Returns:
-
sendChallenge
public AuthenticationMechanism.ChallengeResult sendChallenge(HttpServerExchange exchange, SecurityContext securityContext) Description copied from interface:AuthenticationMechanism
Send an authentication challenge to the remote client.The individual mechanisms should update the response headers and body of the message as appropriate however they should not set the response code, instead that should be indicated in the
AuthenticationMechanism.ChallengeResult
and the most appropriate overall response code will be selected. This method should not returnnull
.- Specified by:
sendChallenge
in interfaceAuthenticationMechanism
- Parameters:
exchange
- The exchangesecurityContext
- The security context- Returns:
- A
AuthenticationMechanism.ChallengeResult
indicating if a challenge was sent and the desired response code.
-
getSession
-
getCookieName
-
setCookieName
-
isHttpOnly
public boolean isHttpOnly() -
setHttpOnly
-
isSecure
public boolean isSecure() -
setSecure
-
getDomain
-
setDomain
-
getPath
-
setPath
-