org.jboss.seam.security.external.saml.idp
Class SamlIdpSingleUser

java.lang.Object
  extended by org.jboss.seam.security.external.saml.idp.SamlIdpSingleUser
All Implemented Interfaces:
SamlIdentityProviderApi

public class SamlIdpSingleUser
extends Object
implements SamlIdentityProviderApi


Constructor Summary
SamlIdpSingleUser()
           
 
Method Summary
 void authenticationFailed(HttpServletResponse response)
          This is one of the possible responses that relate to the SPI call SamlIdentityProviderSpi.authenticate(org.jboss.seam.security.external.api.ResponseHolder).
 void authenticationSucceeded(HttpServletResponse response)
          This is one of the possible responses that relate to the SPI call SamlIdentityProviderSpi.authenticate(org.jboss.seam.security.external.api.ResponseHolder).
 SamlNameId createNameId(String value, String format, String qualifier)
          Creates a name identifier with the given properties.
 SamlIdpSession getSession()
          Gets the current SAML session.
 void globalLogout(HttpServletResponse response)
          Globally logs out the current user.
 void localLogin(SamlNameId nameId, List<AttributeType> attributes)
          Creates a local SAML session for the user with the given name and attributes.
 void localLogout()
          Removes the local SAML session for the current user.
 void remoteLogin(String spEntityId, String remoteUrl, HttpServletResponse response)
           Logs the user in remotely in the application of the given service provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SamlIdpSingleUser

public SamlIdpSingleUser()
Method Detail

authenticationSucceeded

public void authenticationSucceeded(HttpServletResponse response)
Description copied from interface: SamlIdentityProviderApi
This is one of the possible responses that relate to the SPI call SamlIdentityProviderSpi.authenticate(org.jboss.seam.security.external.api.ResponseHolder). If should be called in the same dialogue context as the corresponding SPI call. It instructs the SAML identity provider to send a positive authentication result back to the service provider, using the local SAML session, which must have been established before this call is done (by a previous call to SamlIdentityProviderApi.localLogin(org.jboss.seam.security.external.saml.api.SamlNameId, java.util.List)).

Specified by:
authenticationSucceeded in interface SamlIdentityProviderApi
Parameters:
response - the HTTP servlet response

authenticationFailed

public void authenticationFailed(HttpServletResponse response)
Description copied from interface: SamlIdentityProviderApi
This is one of the possible responses that relate to the SPI call SamlIdentityProviderSpi.authenticate(org.jboss.seam.security.external.api.ResponseHolder). If should be called in the same dialogue context as the corresponding SPI call. It instructs the SAML identity provider to send a positive authentication result back to the service provider.

Specified by:
authenticationFailed in interface SamlIdentityProviderApi
Parameters:
response - the HTTP servlet response

getSession

public SamlIdpSession getSession()
Description copied from interface: SamlIdentityProviderApi
Gets the current SAML session. This contains information about the logged in user, and the external service providers that take part in this session.

Specified by:
getSession in interface SamlIdentityProviderApi
Returns:
the session

localLogin

public void localLogin(SamlNameId nameId,
                       List<AttributeType> attributes)
Description copied from interface: SamlIdentityProviderApi
Creates a local SAML session for the user with the given name and attributes. This call is typically done before a SamlIdentityProviderApi.remoteLogin(java.lang.String, java.lang.String, javax.servlet.http.HttpServletResponse) or an SamlIdentityProviderApi.authenticationSucceeded(javax.servlet.http.HttpServletResponse) call.

Specified by:
localLogin in interface SamlIdentityProviderApi

remoteLogin

public void remoteLogin(String spEntityId,
                        String remoteUrl,
                        HttpServletResponse response)
Description copied from interface: SamlIdentityProviderApi

Logs the user in remotely in the application of the given service provider. If the remote URL is specified, the service provider will redirect the user to that URL within the service provider's application. Otherwise, the service provider will determine for itself which page is shown to the user.

In SAML terms, this call results in an "unsolicited login" at the side of the service provider.

Specified by:
remoteLogin in interface SamlIdentityProviderApi
Parameters:
spEntityId - the entity id of the remote service provider
remoteUrl - the URL where the user agent needs to be redirected to by the service provider (can be null)
response - the HTTP servlet response

localLogout

public void localLogout()
Description copied from interface: SamlIdentityProviderApi
Removes the local SAML session for the current user. This use case is considered out of scope by the SAML spec (see the SAMLv2 Profiles document, section 4.4). External service providers that take part in the session are not informed about the fact that the shared session has been removed at the identity provider side.

Specified by:
localLogout in interface SamlIdentityProviderApi

globalLogout

public void globalLogout(HttpServletResponse response)
Description copied from interface: SamlIdentityProviderApi
Globally logs out the current user. This leads to a "single logout" where the identity provider logs out the user from all service providers that participate in the current session. The result of the global logout is reported asynchronously through the SPI.

Specified by:
globalLogout in interface SamlIdentityProviderApi
Parameters:
response - the HTTP servlet response

createNameId

public SamlNameId createNameId(String value,
                               String format,
                               String qualifier)
Description copied from interface: SamlIdentityProviderApi
Creates a name identifier with the given properties. Needed for constructing the nameId parameter of a SamlIdentityProviderApi.localLogin(org.jboss.seam.security.external.saml.api.SamlNameId, java.util.List) call.

Specified by:
createNameId in interface SamlIdentityProviderApi
Parameters:
value - value (required)
format - format (optional)
qualifier - qualifier (optional)
Returns:
the name identifier


Copyright © 2011 Seam Framework. All Rights Reserved.