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

java.lang.Object
  extended by com.atlassian.crowd.openid.client.consumer.OpenIDAuthResponse
All Implemented Interfaces:
Serializable

public class OpenIDAuthResponse
extends Object
implements Serializable

OpenIDAuthResponse is a representation of the authentication response sent back from the OpenID Provider. The hasError() method should always be called to check if there was a problem in authenticating the OpenID.

See Also:
Serialized Form

Constructor Summary
OpenIDAuthResponse()
          Default constructor.
OpenIDAuthResponse(String identifier)
          Create an OpenIDAuthResponse for an OpenID.
 
Method Summary
 void addAttribute(String name, String value)
          Add attribute/value pair to map of attribtues.
 Map getAttributes()
           
 OpenIDAuthException getError()
          Retrieves the OpenIDAuthException corresponding to the error occured while authenticating with the OpenID Provider.
 String getIdentifier()
           
 boolean hasError()
          If the OpenID provider failed to authenticate the OpenID authentication request, hasError() will return true.
 void setAttributes(Map attributes)
           
 void setError(OpenIDAuthException error)
           
 void setIdentifier(String identifier)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenIDAuthResponse

public OpenIDAuthResponse()
Default constructor.


OpenIDAuthResponse

public OpenIDAuthResponse(String identifier)
Create an OpenIDAuthResponse for an OpenID.

Parameters:
identifier - URI/XRI OpenID.
Method Detail

getIdentifier

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

setIdentifier

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

getAttributes

public Map getAttributes()
Returns:
Map< String attribname, String value >

addAttribute

public void addAttribute(String name,
                         String value)
Add attribute/value pair to map of attribtues.

Parameters:
name - attribute name.
value - attribute value.

setAttributes

public void setAttributes(Map attributes)
Parameters:
attributes - Map< String attribname, String value >

hasError

public boolean hasError()
If the OpenID provider failed to authenticate the OpenID authentication request, hasError() will return true. If the user was successfully authenticated, hasError() will return false. The error can be retrived be the getError() method.

Returns:
false if authentication successful.

getError

public OpenIDAuthException getError()
Retrieves the OpenIDAuthException corresponding to the error occured while authenticating with the OpenID Provider.

Returns:
OpenIDAuthException or null if no error.

setError

public void setError(OpenIDAuthException error)
Parameters:
error - OpenIDAuthException or null if no error.


Copyright © 2012 Atlassian. All Rights Reserved.