org.openid4java.message.pape
Class PapeResponse

java.lang.Object
  extended by org.openid4java.message.pape.PapeMessage
      extended by org.openid4java.message.pape.PapeResponse
All Implemented Interfaces:
MessageExtension, MessageExtensionFactory

public class PapeResponse
extends PapeMessage

Implements the extension for OpenID Provider Authentication Policy responses.

Author:
Marius Scurtescu, Johnny Bufu

Field Summary
protected static java.util.List PAPE_FIELDS
           
 
Fields inherited from class org.openid4java.message.pape.PapeMessage
_parameters, AUTH_LEVEL_NS_PREFIX, AUTH_LEVEL_PREFIX, authLevelAliases, OPENID_NS_PAPE, PAPE_POLICY_MULTI_FACTOR, PAPE_POLICY_MULTI_FACTOR_PHYSICAL, PAPE_POLICY_PHISHING_RESISTANT
 
Constructor Summary
protected PapeResponse()
          Constructs a Pape Response with an empty parameter list.
protected PapeResponse(ParameterList params)
          Constructs a Pape Response from a parameter list.
 
Method Summary
 void addAuthPolicy(java.lang.String policyUri)
          Adds an authentication policy URI to the auth_policies parameter.
static PapeResponse createPapeResponse()
          Constructs a Pape Response with an empty parameter list.
static PapeResponse createPapeResponse(ParameterList params)
           
 java.util.Date getAuthDate()
          Gets the timestamp when the End User has most recentnly authenticated to the OpenID Provider in a manner fitting the asserted policies.
 java.lang.String getAuthPolicies()
          Gets the auth_policies parameter value.
 java.util.List getAuthPoliciesList()
          Gets a list with the auth_policies.
 java.lang.String getAuthTime()
          Gets the timestamp when the End User has most recentnly authenticated to the OpenID Provider in a manner fitting the asserted policies.
 java.lang.String getCustomAuthLevel(java.lang.String authLevelTypeUri)
           
 void setAuthPolicies(java.lang.String policyUris)
          Sets a new value for the auth_policies parameter.
 void setAuthTime(java.util.Date timestamp)
          Sets the auth_time parameter.
 void setCustomAuthLevel(java.lang.String authLevelTypeUri, java.lang.String level)
           
 
Methods inherited from class org.openid4java.message.pape.PapeMessage
addAuthLevelExtension, getCustomAuthLevelAlias, getExtension, getParameter, getParameters, getParameterValue, getTypeUri, hasCustomAuthLevel, hasParameter, providesIdentifier, set, setParameters, signRequired
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PAPE_FIELDS

protected static final java.util.List PAPE_FIELDS
Constructor Detail

PapeResponse

protected PapeResponse()
Constructs a Pape Response with an empty parameter list.


PapeResponse

protected PapeResponse(ParameterList params)
Constructs a Pape Response from a parameter list.

The parameter list can be extracted from a received message with the getExtensionParams method of the Message class, and MUST NOT contain the "openid.." prefix.

Method Detail

createPapeResponse

public static PapeResponse createPapeResponse()
Constructs a Pape Response with an empty parameter list.


createPapeResponse

public static PapeResponse createPapeResponse(ParameterList params)
                                       throws MessageException
Throws:
MessageException

getAuthPolicies

public java.lang.String getAuthPolicies()
Gets the auth_policies parameter value.


setAuthPolicies

public void setAuthPolicies(java.lang.String policyUris)
Sets a new value for the auth_policies parameter. The previous value of the parameter will be owerwritten.

Parameters:
policyUris - Space separated list of authentication policy URIs to be set.
See Also:
addAuthPolicy(String)

addAuthPolicy

public void addAuthPolicy(java.lang.String policyUri)
Adds an authentication policy URI to the auth_policies parameter.

Parameters:
policyUri - The authentication policy URI to be set.
See Also:
setAuthPolicies(String)

getAuthPoliciesList

public java.util.List getAuthPoliciesList()
Gets a list with the auth_policies. An empty list is returned if no authentication policies exist.


setAuthTime

public void setAuthTime(java.util.Date timestamp)
Sets the auth_time parameter.

Parameters:
timestamp - The most recent timestamp when the End User has actively authenticated to the OP in a manner fitting the asserted policies.

getAuthTime

public java.lang.String getAuthTime()
Gets the timestamp when the End User has most recentnly authenticated to the OpenID Provider in a manner fitting the asserted policies.

Returns:
The verbatim value of the auth_time parameter. Null is returned if the parameter is not present in the PapeResponse.
See Also:
getAuthDate()

getAuthDate

public java.util.Date getAuthDate()
Gets the timestamp when the End User has most recentnly authenticated to the OpenID Provider in a manner fitting the asserted policies.

Returns:
The value of the auth_time parameter parsed into a java.util.Date. Null is returned if the parameter is not present in the PapeResponse, or if the parameter value is invalid.
See Also:
getAuthTime()

setCustomAuthLevel

public void setCustomAuthLevel(java.lang.String authLevelTypeUri,
                               java.lang.String level)

getCustomAuthLevel

public java.lang.String getCustomAuthLevel(java.lang.String authLevelTypeUri)


Copyright © 2011 Sxip. All Rights Reserved.