org.wso2.solutions.identity.openid.extensions
Class OpenIDAttributeExchange

java.lang.Object
  extended by org.wso2.solutions.identity.openid.extensions.OpenIDExtension
      extended by org.wso2.solutions.identity.openid.extensions.OpenIDAttributeExchange

public class OpenIDAttributeExchange
extends OpenIDExtension


Constructor Summary
OpenIDAttributeExchange(OpenIDAuthenticationRequest request)
          Constructed during building the response
 
Method Summary
 void addRequiredAttributes(java.util.List<java.lang.String> requiredAttributes)
           
protected  java.lang.String getMappedAxSchema(java.lang.String val)
          This provides a mapping between http://schema.openid.net/ and http://axschema.org
 org.openid4java.message.MessageExtension getMessageExtension(java.lang.String userId, java.lang.String profileName)
          Creates an instance of MessageExtension for the OpenID authentication response
protected  java.util.Map<java.lang.String,OpenIDClaim> populateAttributeValues(java.util.Map<java.lang.String,java.lang.String> requiredClaims, java.lang.String userId, java.lang.String profileName)
          Populate the required claims with claim values.
protected  void setAttributeExchangeValues(org.openid4java.message.ax.FetchResponse response, java.util.Map<java.lang.String,OpenIDClaim> claimValues)
          Populate the response with claim values.
 
Methods inherited from class org.wso2.solutions.identity.openid.extensions.OpenIDExtension
mapToAttriId, populateAttributeValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenIDAttributeExchange

public OpenIDAttributeExchange(OpenIDAuthenticationRequest request)
Constructed during building the response

Parameters:
request - An instance of OpenIDAuthenticationRequest
Method Detail

addRequiredAttributes

public void addRequiredAttributes(java.util.List<java.lang.String> requiredAttributes)
                           throws IdentityProviderException
Specified by:
addRequiredAttributes in class OpenIDExtension
Throws:
IdentityProviderException

getMessageExtension

public org.openid4java.message.MessageExtension getMessageExtension(java.lang.String userId,
                                                                    java.lang.String profileName)
                                                             throws IdentityProviderException
Creates an instance of MessageExtension for the OpenID authentication response

Specified by:
getMessageExtension in class OpenIDExtension
Parameters:
request - OpenID authentication request
Returns:
An instance of MessageExtension
Throws:
RelyingPartyException
IdentityProviderException

populateAttributeValues

protected java.util.Map<java.lang.String,OpenIDClaim> populateAttributeValues(java.util.Map<java.lang.String,java.lang.String> requiredClaims,
                                                                              java.lang.String userId,
                                                                              java.lang.String profileName)
                                                                       throws IdentityProviderException
Populate the required claims with claim values.

Parameters:
requiredClaims - Required claims as requested by the RP.
userId - User ID.
Returns:
A map, populated with required claim values.
Throws:
IdentityProviderException

getMappedAxSchema

protected java.lang.String getMappedAxSchema(java.lang.String val)
                                      throws IdentityProviderException
This provides a mapping between http://schema.openid.net/ and http://axschema.org

Parameters:
val - schema name-space URL
Returns:
mapped value
Throws:
IdentityProviderException

setAttributeExchangeValues

protected void setAttributeExchangeValues(org.openid4java.message.ax.FetchResponse response,
                                          java.util.Map<java.lang.String,OpenIDClaim> claimValues)
                                   throws org.openid4java.message.MessageException
Populate the response with claim values. If we can't find the required values with us, we simply avoid sending them. An Identity Provider MAY return any subset of the following fields in response to the query.

Parameters:
claimValues - Claim values.
Throws:
org.openid4java.message.MessageException