Package openid :: Package extensions :: Package draft :: Module pape2 :: Class Response
[frames] | no frames]

Class Response

source code

         object --+    
                  |    
extension.Extension --+
                      |
                     Response

A Provider Authentication Policy response, sent from a provider to a relying party

Instance Methods
 
__init__(self, auth_policies=None, auth_time=None, nist_auth_level=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
addPolicyURI(self, policy_uri)
Add a authentication policy to this response
source code
 
parseExtensionArgs(self, args, strict=False)
Parse the provider authentication policy arguments into the internal state of this object
source code
 
getExtensionArgs(self)
Get the string arguments that should be added to an OpenID message for this extension.
source code

Inherited from extension.Extension: toMessage

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Methods
Response or None
fromSuccessResponse(cls, success_response)
Create a Response object from a successful OpenID library response (openid.consumer.consumer.SuccessResponse) response message
source code
Class Variables
  ns_alias = 'pape'
  ns_uri = 'http://specs.openid.net/extensions/pape/1.0'
The namespace to which to add the arguments for this extension
Properties

Inherited from object: __class__

Method Details

__init__(self, auth_policies=None, auth_time=None, nist_auth_level=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

addPolicyURI(self, policy_uri)

source code 

Add a authentication policy to this response

This method is intended to be used by the provider to add a policy that the provider conformed to when authenticating the user.

Parameters:
  • policy_uri - The identifier for the preferred type of authentication.

See Also: http://openid.net/specs/openid-provider-authentication-policy-extension-1_0-01.html#auth_policies

parseExtensionArgs(self, args, strict=False)

source code 

Parse the provider authentication policy arguments into the internal state of this object

Parameters:
  • args - unqualified provider authentication policy arguments
  • strict - Whether to raise an exception when bad data is encountered
Returns:
None. The data is parsed into the internal fields of this object.

fromSuccessResponse(cls, success_response)
Class Method

source code 

Create a Response object from a successful OpenID library response (openid.consumer.consumer.SuccessResponse) response message

Parameters:
Returns: Response or None
A provider authentication policy response from the data that was supplied with the id_res response or None if the provider sent no signed PAPE response arguments.

getExtensionArgs(self)

source code 

Get the string arguments that should be added to an OpenID message for this extension.

Returns:
A dictionary of completely non-namespaced arguments to be added. For example, if the extension's alias is 'uncle', and this method returns {'meat':'Hot Rats'}, the final message will contain {'openid.uncle.meat':'Hot Rats'}
Overrides: extension.Extension.getExtensionArgs