com.atlassian.crowd.openid.client.consumer
Class OpenIDPrincipal

java.lang.Object
  extended by com.atlassian.crowd.openid.client.consumer.OpenIDPrincipal

public class OpenIDPrincipal
extends Object

OpenIDPrincipal represents an authenticated OpenID user. The OpenIDPrincipal must have an OpenID identifier, and may have attributes (retrieved via Attribute Exchange).


Constructor Summary
OpenIDPrincipal(OpenIDAuthResponse resp)
          Construct an OpenIDPrincipal from an OpenIDAuthResponse message.
 
Method Summary
 String getAttribute(String key)
          Returns the value of an attribute.
 Map getAttributesMap()
          Map of attributes (may be null if no attributes present).
 String getIdentifier()
           
 void setAttributesMap(Map attributesMap)
          Map of attributes (may be null if no attributes present).
 void setIdentifier(String identifier)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenIDPrincipal

public OpenIDPrincipal(OpenIDAuthResponse resp)
                throws OpenIDAuthResponseException
Construct an OpenIDPrincipal from an OpenIDAuthResponse message.

Parameters:
resp - OpenIDAuthResponse message.
Throws:
OpenIDAuthResponseException - if the OpenIDAuthResponse is an error message.
Method Detail

getIdentifier

public String getIdentifier()
Returns:
URI/XRI OpenID.

setIdentifier

public void setIdentifier(String identifier)
Parameters:
identifier - URI/XRI OpenID.

getAttributesMap

public Map getAttributesMap()
Map of attributes (may be null if no attributes present).

Returns:
Map< String attribname, List values >

setAttributesMap

public void setAttributesMap(Map attributesMap)
Map of attributes (may be null if no attributes present).

Parameters:
attributesMap - Map< String attribname, List values >

getAttribute

public String getAttribute(String key)
Returns the value of an attribute.

Parameters:
key - attribute name.
Returns:
returns null if attribute does not exist.


Copyright © 2012 Atlassian. All Rights Reserved.