Top Description Inners Fields Constructors Methods
io.undertow.security.impl

public Class SingleSignOnAuthenticationMechanism

extends Object
implements AuthenticationMechanism
Class Inheritance
All Implemented Interfaces
io.undertow.security.api.AuthenticationMechanism
Imports
io.undertow.UndertowLogger, io.undertow.security.api.AuthenticationMechanism, .NotificationReceiver, .SecurityContext, .SecurityNotification, io.undertow.security.idm.Account, .IdentityManager, io.undertow.server.ConduitWrapper, .HttpServerExchange, io.undertow.server.handlers.Cookie, .CookieImpl, io.undertow.server.session.Session, .SessionListener, .SessionManager, io.undertow.util.ConduitFactory, .Sessions, org.jboss.logging.Logger, org.xnio.conduits.StreamSinkConduit, java.util.Collections, .LinkedList, .List, .Set, .WeakHashMap

Authenticator that can be used to configure single sign on.
Authors
Stuart Douglas, Paul Ferraro, Richard Opalka

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
pack-priv class

Field Summary

Modifier and TypeField and Description
private String
private String
private boolean
private final IdentityManager
private final SingleSignOnAuthenticationMechanism.SessionInvalidationListener
private static final Logger
private String
private final SingleSignOnAuthenticationMechanism.ResponseListener
private boolean
private final Set<SessionManager>
private final SingleSignOnManager
private static final String

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public AuthenticationMechanism.AuthenticationMechanismOutcome
authenticate(HttpServerExchange
The exchange
exchange
,
SecurityContext securityContext)

Implements io.undertow.security.api.AuthenticationMechanism.authenticate.

Perform authentication of the request.

private void
public String
public String
private IdentityManager
public String
protected Session
public boolean
public boolean
private void
public AuthenticationMechanism.ChallengeResult
sendChallenge(HttpServerExchange
The exchange
exchange
,
SecurityContext
The security context
securityContext
)

Implements io.undertow.security.api.AuthenticationMechanism.sendChallenge.

Send an authentication challenge to the remote client.

public SingleSignOnAuthenticationMechanism
setCookieName(String cookieName)

public SingleSignOnAuthenticationMechanism
setDomain(String domain)

public SingleSignOnAuthenticationMechanism
setHttpOnly(boolean httpOnly)

public SingleSignOnAuthenticationMechanism
public SingleSignOnAuthenticationMechanism
setSecure(boolean secure)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cookieNameback to summary
private String cookieName
domainback to summary
private String domain
httpOnlyback to summary
private boolean httpOnly
identityManagerback to summary
private final IdentityManager identityManager
listenerback to summary
private final SingleSignOnAuthenticationMechanism.SessionInvalidationListener listener
logback to summary
private static final Logger log
pathback to summary
private String path
responseListenerback to summary
private final SingleSignOnAuthenticationMechanism.ResponseListener responseListener
secureback to summary
private boolean secure
seenSessionManagersback to summary
private final Set<SessionManager> seenSessionManagers
singleSignOnManagerback to summary
private final SingleSignOnManager singleSignOnManager
SSO_SESSION_ATTRIBUTEback to summary
private static final String SSO_SESSION_ATTRIBUTE

Constructor Detail

SingleSignOnAuthenticationMechanismback to summary
public SingleSignOnAuthenticationMechanism(SingleSignOnManager storage)
SingleSignOnAuthenticationMechanismback to summary
public SingleSignOnAuthenticationMechanism(SingleSignOnManager storage, IdentityManager identityManager)

Method Detail

authenticateback to summary
public AuthenticationMechanism.AuthenticationMechanismOutcome authenticate(HttpServerExchange exchange, SecurityContext securityContext)

Implements io.undertow.security.api.AuthenticationMechanism.authenticate.

Doc from io.undertow.security.api.AuthenticationMechanism.authenticate.

Perform authentication of the request. Any potentially blocking work should be performed in the handoff executor provided

Parameters
exchange:HttpServerExchange

The exchange

Annotations
@Override
clearSsoCookieback to summary
private void clearSsoCookie(HttpServerExchange exchange)
getCookieNameback to summary
public String getCookieName()
getDomainback to summary
public String getDomain()
getIdentityManagerback to summary
private IdentityManager getIdentityManager(SecurityContext securityContext)
Annotations
@SuppressWarnings:deprecation
getPathback to summary
public String getPath()
getSessionback to summary
protected Session getSession(final HttpServerExchange exchange)
isHttpOnlyback to summary
public boolean isHttpOnly()
isSecureback to summary
public boolean isSecure()
registerSessionIfRequiredback to summary
private void registerSessionIfRequired(SingleSignOn sso, Session session)
sendChallengeback to summary
public AuthenticationMechanism.ChallengeResult sendChallenge(HttpServerExchange exchange, SecurityContext securityContext)

Implements io.undertow.security.api.AuthenticationMechanism.sendChallenge.

Doc from io.undertow.security.api.AuthenticationMechanism.sendChallenge.

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 ChallengeResult and the most appropriate overall response code will be selected. This method should not return null.

Parameters
exchange:HttpServerExchange

The exchange

securityContext:SecurityContext

The security context

Returns:AuthenticationMechanism.ChallengeResult

A ChallengeResult indicating if a challenge was sent and the desired response code.

Annotations
@Override
setCookieNameback to summary
public SingleSignOnAuthenticationMechanism setCookieName(String cookieName)
setDomainback to summary
public SingleSignOnAuthenticationMechanism setDomain(String domain)
setHttpOnlyback to summary
public SingleSignOnAuthenticationMechanism setHttpOnly(boolean httpOnly)
setPathback to summary
public SingleSignOnAuthenticationMechanism setPath(String path)
setSecureback to summary
public SingleSignOnAuthenticationMechanism setSecure(boolean secure)
io.undertow.security.impl back to summary

pack-priv final Class SingleSignOnAuthenticationMechanism.ResponseListener

extends Object
implements ConduitWrapper<StreamSinkConduit>
Class Inheritance
  • java.lang.Object
  • io.undertow.security.impl.SingleSignOnAuthenticationMechanism.ResponseListener
All Implemented Interfaces
io.undertow.server.ConduitWrapper

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public StreamSinkConduit
wrap(ConduitFactory<StreamSinkConduit>
the original conduit
factory
,
HttpServerExchange
the in-flight HTTP exchange
exchange
)

Implements io.undertow.server.ConduitWrapper.wrap.

Wrap the conduit.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ResponseListenerback to summary
pack-priv ResponseListener()

Method Detail

wrapback to summary
public StreamSinkConduit wrap(ConduitFactory<StreamSinkConduit> factory, HttpServerExchange exchange)

Implements io.undertow.server.ConduitWrapper.wrap.

Doc from io.undertow.server.ConduitWrapper.wrap.

Wrap the conduit. The wrapper should not return null. If no wrapping is desired, the original conduit should be returned.

Parameters
factory:ConduitFactory<StreamSinkConduit>

the original conduit

exchange:HttpServerExchange

the in-flight HTTP exchange

Returns:StreamSinkConduit

the replacement conduit

Annotations
@Override
io.undertow.security.impl back to summary

pack-priv final Class SingleSignOnAuthenticationMechanism.SessionInvalidationListener

extends Object
implements SessionListener
Class Inheritance
  • java.lang.Object
  • io.undertow.security.impl.SingleSignOnAuthenticationMechanism.SessionInvalidationListener
All Implemented Interfaces
io.undertow.server.session.SessionListener

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
public void
sessionCreated(Session
The new session
session
,
HttpServerExchange
The HttpServerExchange that created the session
exchange
)

Overrides default io.undertow.server.session.SessionListener.sessionCreated.

Called when a session is created

public void
sessionDestroyed(Session
The new session
session
,
HttpServerExchange
The HttpServerExchange that destroyed the session, or null if the session timed out
exchange
,
SessionListener.SessionDestroyedReason
The reason why the session was expired
reason
)

Overrides default io.undertow.server.session.SessionListener.sessionDestroyed.

Called when a session is destroyed

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SessionInvalidationListenerback to summary
pack-priv SessionInvalidationListener()

Method Detail

attributeAddedback to summary
public void attributeAdded(Session session, String name, Object value)

Overrides default io.undertow.server.session.SessionListener.attributeAdded.

Annotations
@Override
attributeRemovedback to summary
public void attributeRemoved(Session session, String name, Object oldValue)

Overrides default io.undertow.server.session.SessionListener.attributeRemoved.

Annotations
@Override
attributeUpdatedback to summary
public void attributeUpdated(Session session, String name, Object newValue, Object oldValue)

Overrides default io.undertow.server.session.SessionListener.attributeUpdated.

Annotations
@Override
sessionCreatedback to summary
public void sessionCreated(Session session, HttpServerExchange exchange)

Overrides default io.undertow.server.session.SessionListener.sessionCreated.

Doc from io.undertow.server.session.SessionListener.sessionCreated.

Called when a session is created

Parameters
session:Session

The new session

exchange:HttpServerExchange

The HttpServerExchange that created the session

Annotations
@Override
sessionDestroyedback to summary
public void sessionDestroyed(Session session, HttpServerExchange exchange, SessionListener.SessionDestroyedReason reason)

Overrides default io.undertow.server.session.SessionListener.sessionDestroyed.

Doc from io.undertow.server.session.SessionListener.sessionDestroyed.

Called when a session is destroyed

Parameters
session:Session

The new session

exchange:HttpServerExchange

The HttpServerExchange that destroyed the session, or null if the session timed out

reason:SessionListener.SessionDestroyedReason

The reason why the session was expired

Annotations
@Override
sessionIdChangedback to summary
public void sessionIdChanged(Session session, String oldSessionId)

Overrides default io.undertow.server.session.SessionListener.sessionIdChanged.

Annotations
@Override