org.jboss.seam.security.external.openid.api
Interface OpenIdProviderApi

All Known Implementing Classes:
OpenIdProviderBean

public interface OpenIdProviderApi

API to the OpenID Provider (OP) of Seam security. In order to use this API, one of the following alternative beans needs to be activated:

The former will install the OpenID provider in application scope, the latter will install it in virtual application scope. The virtual application scope allows for using different provider configurations depending on the server name. See VirtualApplicationScoped.

This API (implemented by the framework) comes along with an SPI: OpenIdProviderSpi (implemented by the client application). Dialogues are used to bridge corresponding API and SPI calls (see Dialogued).

Most methods in this API require that the HTTP response is passed as a parameter. The implementation needs the response, in order to redirect the browser to the relying party. Beware not to touch the HTTP response after one of these method returns.

Author:
Marcel Kolsteren

Method Summary
 void authenticationFailed(javax.servlet.http.HttpServletResponse response)
          This is one of the possible reactions of the application after having received and processed an authentication request through the API call OpenIdProviderSpi.authenticate(String, String, boolean, ResponseHolder) .
 void authenticationSucceeded(String userName, javax.servlet.http.HttpServletResponse response)
          This is one of the possible reactions of the application after having received and processed an authentication request through the API call OpenIdProviderSpi.authenticate(String, String, boolean, ResponseHolder) .
 String getOpLocalIdentifierForUserName(String userName)
          This method can be used to find out the OP-Local identifier for a given user name.
 void setAttributes(Map<String,List<String>> attributeValues, javax.servlet.http.HttpServletResponse response)
           
 

Method Detail

authenticationSucceeded

void authenticationSucceeded(String userName,
                             javax.servlet.http.HttpServletResponse response)
This is one of the possible reactions of the application after having received and processed an authentication request through the API call OpenIdProviderSpi.authenticate(String, String, boolean, ResponseHolder) . By calling this method, the application informs the OpenID provider module that authentication succeeded. The userName of the authenticated user is provided. The OpenID provider module will redirect the user back to the relying party's website.

Parameters:
userName - user name
response - HTTP response

authenticationFailed

void authenticationFailed(javax.servlet.http.HttpServletResponse response)
This is one of the possible reactions of the application after having received and processed an authentication request through the API call OpenIdProviderSpi.authenticate(String, String, boolean, ResponseHolder) . By calling this method, the application informs the OpenID provider module that authentication failed. The OpenID provider module will redirect the user back to the relying party's website.

Parameters:
userName - user name
response - HTTP response

setAttributes

void setAttributes(Map<String,List<String>> attributeValues,
                   javax.servlet.http.HttpServletResponse response)

getOpLocalIdentifierForUserName

String getOpLocalIdentifierForUserName(String userName)
This method can be used to find out the OP-Local identifier for a given user name. The OpenID authentication specification defines this identifier as follows: 'An alternate Identifier for an end user that is local to a particular OP and thus not necessarily under the end user's control'.

Parameters:
userName - user name
Returns:
the OP-Local Identifier


Copyright © 2011 Seam Framework. All Rights Reserved.