Package io.undertow.security.impl
Class SingleSignOnAuthenticationMechanism
- java.lang.Object
-
- io.undertow.security.impl.SingleSignOnAuthenticationMechanism
-
- All Implemented Interfaces:
AuthenticationMechanism
public class SingleSignOnAuthenticationMechanism extends Object implements 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
Constructors Constructor Description SingleSignOnAuthenticationMechanism(SingleSignOnManager storage)SingleSignOnAuthenticationMechanism(SingleSignOnManager storage, IdentityManager identityManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthenticationMechanism.AuthenticationMechanismOutcomeauthenticate(HttpServerExchange exchange, SecurityContext securityContext)Perform authentication of the request.StringgetCookieName()StringgetDomain()StringgetPath()protected SessiongetSession(HttpServerExchange exchange)booleanisHttpOnly()booleanisSecure()AuthenticationMechanism.ChallengeResultsendChallenge(HttpServerExchange exchange, SecurityContext securityContext)Send an authentication challenge to the remote client.SingleSignOnAuthenticationMechanismsetCookieName(String cookieName)SingleSignOnAuthenticationMechanismsetDomain(String domain)SingleSignOnAuthenticationMechanismsetHttpOnly(boolean httpOnly)SingleSignOnAuthenticationMechanismsetPath(String path)SingleSignOnAuthenticationMechanismsetSecure(boolean secure)
-
-
-
Constructor Detail
-
SingleSignOnAuthenticationMechanism
public SingleSignOnAuthenticationMechanism(SingleSignOnManager storage)
-
SingleSignOnAuthenticationMechanism
public SingleSignOnAuthenticationMechanism(SingleSignOnManager storage, IdentityManager identityManager)
-
-
Method Detail
-
authenticate
public AuthenticationMechanism.AuthenticationMechanismOutcome authenticate(HttpServerExchange exchange, SecurityContext securityContext)
Description copied from interface:AuthenticationMechanismPerform authentication of the request. Any potentially blocking work should be performed in the handoff executor provided- Specified by:
authenticatein interfaceAuthenticationMechanism- Parameters:
exchange- The exchange- Returns:
-
sendChallenge
public AuthenticationMechanism.ChallengeResult sendChallenge(HttpServerExchange exchange, SecurityContext securityContext)
Description copied from interface:AuthenticationMechanismSend 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.ChallengeResultand the most appropriate overall response code will be selected. This method should not returnnull.- Specified by:
sendChallengein interfaceAuthenticationMechanism- Parameters:
exchange- The exchangesecurityContext- The security context- Returns:
- A
AuthenticationMechanism.ChallengeResultindicating if a challenge was sent and the desired response code.
-
getSession
protected Session getSession(HttpServerExchange exchange)
-
getCookieName
public String getCookieName()
-
setCookieName
public SingleSignOnAuthenticationMechanism setCookieName(String cookieName)
-
isHttpOnly
public boolean isHttpOnly()
-
setHttpOnly
public SingleSignOnAuthenticationMechanism setHttpOnly(boolean httpOnly)
-
isSecure
public boolean isSecure()
-
setSecure
public SingleSignOnAuthenticationMechanism setSecure(boolean secure)
-
getDomain
public String getDomain()
-
setDomain
public SingleSignOnAuthenticationMechanism setDomain(String domain)
-
getPath
public String getPath()
-
setPath
public SingleSignOnAuthenticationMechanism setPath(String path)
-
-