org.wso2.solutions.identity.openid
Class OpenIDUtil

java.lang.Object
  extended by org.wso2.solutions.identity.openid.OpenIDUtil

public class OpenIDUtil
extends java.lang.Object


Constructor Summary
OpenIDUtil()
           
 
Method Summary
static java.lang.String generateOpenID(java.lang.String user)
          Generate OpenID for a given user.
static java.lang.String getMappedAxSchema(java.lang.String val)
          This provides a mapping between http://schema.openid.net/ and http://axschema.org
static java.lang.String getOpenID(java.lang.String userName)
          Find the OpenID corresponding to the given user name.
static java.lang.String getRelyingPartyUrl(java.lang.String rpUrl)
          Normalize the provided relying party URL
static java.lang.String[] getRequestedAuthenticationPolicies(org.openid4java.message.ParameterList params)
          Extracts authentication policies from the PAPE request
static java.lang.String getUserName(java.lang.String openId)
          Find the user name corresponding to the given OpenID.
static boolean isUserExist(java.lang.String userName)
          Check whether the given user exists in the system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenIDUtil

public OpenIDUtil()
Method Detail

getUserName

public static java.lang.String getUserName(java.lang.String openId)
                                    throws IdentityProviderException
Find the user name corresponding to the given OpenID.

Parameters:
openId - User's OpenID
Returns:
User name corresponding the given OpenID.
Throws:
IdentityProviderException

generateOpenID

public static java.lang.String generateOpenID(java.lang.String user)
                                       throws IdentityProviderException
Generate OpenID for a given user.

Parameters:
user - User
Returns:
Generated OpenID
Throws:
IdentityProviderException

isUserExist

public static boolean isUserExist(java.lang.String userName)
Check whether the given user exists in the system.

Parameters:
userName - User name.
Returns:

getRelyingPartyUrl

public static java.lang.String getRelyingPartyUrl(java.lang.String rpUrl)
                                           throws IdentityProviderException
Normalize the provided relying party URL

Parameters:
rpUrl - Relying party URL to be normalized
Returns:
Normalized relying party URL
Throws:
RelyingPartyException
IdentityProviderException

getMappedAxSchema

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

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

getRequestedAuthenticationPolicies

public static java.lang.String[] getRequestedAuthenticationPolicies(org.openid4java.message.ParameterList params)
                                                             throws IdentityProviderException
Extracts authentication policies from the PAPE request

Parameters:
params - OpenID parameter list
Returns:
Set of authentication policies as requested by PAPE request
Throws:
IdentityProviderException

getOpenID

public static java.lang.String getOpenID(java.lang.String userName)
                                  throws IdentityProviderException
Find the OpenID corresponding to the given user name.

Parameters:
userName - User name
Returns:
OpenID corresponding the given user name.
Throws:
IdentityProviderException