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

All Known Implementing Classes:
OpenIdRpBean

public interface OpenIdRelyingPartyApi

API to the OpenID Relying Party (RP) 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 relying party 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: OpenIdRelyingPartySpi (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
 OpenIdRequestedAttribute createOpenIdRequestedAttribute(String alias, String typeUri, boolean required, Integer count)
          Creates a request to fetch a certain attribute from the OpenID Provider.
 void login(String identifier, List<OpenIdRequestedAttribute> attributes, HttpServletResponse response)
          Start an OpenID login dialogue.
 

Method Detail

login

void login(String identifier,
           List<OpenIdRequestedAttribute> attributes,
           HttpServletResponse response)
Start an OpenID login dialogue.

Parameters:
identifier - either a Claimed Identifier (identifying the user) or an OP Identifier (identifying the OpenID Provider where the user has an account)
attributes - attributes that are requested (they should have different aliases)
response - the HTTP servlet response

createOpenIdRequestedAttribute

OpenIdRequestedAttribute createOpenIdRequestedAttribute(String alias,
                                                        String typeUri,
                                                        boolean required,
                                                        Integer count)
Creates a request to fetch a certain attribute from the OpenID Provider. The resulting object can be passed to the login(java.lang.String, java.util.List, javax.servlet.http.HttpServletResponse) method.

Parameters:
alias - name that identifies this requested attribute
typeUri - attribute type identifier
required - indicates whether the attribute is required
count - indicates the maximum number of values to be returned by the provider; must be at least 1
Returns:
the requested attribute


Copyright © 2011 Seam Framework. All Rights Reserved.