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

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

public class OpenIDAuthRequest
extends Object
implements Serializable

OpenIDAuthRequest contains all the information required to launch an OpenID authentication request to an OpenID Provider. The indentifier and returnURL are required fields. The requiredAttributes and optionalAttributes are optional (may be set to null).

See Also:
Serialized Form

Constructor Summary
OpenIDAuthRequest(String identifier, String returnURL)
          Creates an OpenID authentication request for an OpenID.
 
Method Summary
 void addOptionalAttribute(String attrib)
          Adds an optional attribute to the list of optional attributes.
 void addRequiredAttribute(String attrib)
          Adds an attribute to the list of required attributes.
 String getIdentifier()
           
 List getOptionalAttributes()
          Return the list of optional attibutes.
 List getRequiredAttributes()
          Return the list of required attibutes.
 String getReturnURL()
           
 boolean hasOptionalAttributes()
           
 boolean hasRequiredAttributes()
           
 boolean isImmediate()
           
 boolean isStateless()
           
 void setIdentifier(String identifier)
           
 void setImmediate(boolean immediate)
           
 void setOptionalAttributes(List optionalAttributes)
           
 void setRequiredAttributes(List requiredAttributes)
           
 void setReturnURL(String returnURL)
           
 void setStateless(boolean stateless)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenIDAuthRequest

public OpenIDAuthRequest(String identifier,
                         String returnURL)
Creates an OpenID authentication request for an OpenID.

Parameters:
identifier - the URI or XRI representing a users OpenID.
returnURL - URL OpenID Provider will redirect the authentication response to.
Method Detail

addRequiredAttribute

public void addRequiredAttribute(String attrib)
Adds an attribute to the list of required attributes.

Parameters:
attrib - name of attribute to add.

addOptionalAttribute

public void addOptionalAttribute(String attrib)
Adds an optional attribute to the list of optional attributes.

Parameters:
attrib - name of attribute to add.

hasRequiredAttributes

public boolean hasRequiredAttributes()
Returns:
true if request has any requireAttributes.

hasOptionalAttributes

public boolean hasOptionalAttributes()
Returns:
true if request has any optionalAttributes.

getIdentifier

public String getIdentifier()
Returns:
URI/XRI OpenID this request will verify.

setIdentifier

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

getRequiredAttributes

public List getRequiredAttributes()
Return the list of required attibutes.

Returns:
List: list may be null or zero sized if there are no required attributes.

getOptionalAttributes

public List getOptionalAttributes()
Return the list of optional attibutes.

Returns:
List: list may be null or zero sized if there are no optional attributes.

getReturnURL

public String getReturnURL()
Returns:
URL OpenID Provider will redirect the authentication response to.

setReturnURL

public void setReturnURL(String returnURL)
Parameters:
returnURL - sets the URL the OpenID Provider will redirect the authentication response to.

setRequiredAttributes

public void setRequiredAttributes(List requiredAttributes)
Parameters:
requiredAttributes - List: a list of required attribute names (can be null)

setOptionalAttributes

public void setOptionalAttributes(List optionalAttributes)
Parameters:
optionalAttributes - List :a list of optional attribute names (can be null)

isImmediate

public boolean isImmediate()

setImmediate

public void setImmediate(boolean immediate)

isStateless

public boolean isStateless()

setStateless

public void setStateless(boolean stateless)


Copyright © 2012 Atlassian. All Rights Reserved.