Package openid :: Package extensions :: Module ax :: Class FetchRequest
[frames | no frames]

Type FetchRequest

object --+        
         |        
 Extension --+    
             |    
     AXMessage --+
                 |
                FetchRequest


An attribute exchange 'fetch_request' message. This message is sent by a relying party when it wishes to obtain attributes about the subject of an OpenID authentication request.
Method Summary
  __init__(self, update_url)
  __contains__(self, type_uri)
Is the given type URI present in this fetch_request?
  __iter__(self)
Iterate over the attribute type URIs in this fetch_request
  add(self, attribute)
Add an attribute to this attribute exchange request.
FetchRequest or None fromOpenIDRequest(cls, openid_request)
Extract a FetchRequest from an OpenID message (Class method)
{unicode:unicode} getExtensionArgs(self)
Get the serialized form of this attribute fetch request.
[str] getRequiredAttrs(self)
Get the type URIs for all attributes that have been marked as required.
  has_key(self, type_uri)
Is the given type URI present in this fetch_request?
  iterAttrs(self)
Iterate over the AttrInfo objects that are contained in this fetch_request.
  parseExtensionArgs(self, ax_args)
Given attribute exchange arguments, populate this FetchRequest.
Inherited from Extension: toMessage
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Instance Variable Summary
{str:AttrInfo} requested_attributes: The attributes that have been requested thus far, indexed by the type URI.
  update_url: A URL that will accept responses for this attribute exchange request, even in the absence of the user who made this request.

Class Variable Summary
NoneType mode: The type of this attribute exchange message.

Instance Method Details

__contains__(self, type_uri)
(In operator)

Is the given type URI present in this fetch_request?

__iter__(self)

Iterate over the attribute type URIs in this fetch_request

add(self, attribute)

Add an attribute to this attribute exchange request.
Parameters:
attribute - The attribute that is being requested
           (type=AttrInfo)
Returns:
None
Raises:
KeyError - when the requested attribute is already present in this fetch request.

getExtensionArgs(self)

Get the serialized form of this attribute fetch request.
Returns:
The fetch request message parameters
           (type={unicode:unicode})
Overrides:
openid.extension.Extension.getExtensionArgs

getRequiredAttrs(self)

Get the type URIs for all attributes that have been marked as required.
Returns:
A list of the type URIs for attributes that have been marked as required.
           (type=[str])

has_key(self, type_uri)

Is the given type URI present in this fetch_request?

iterAttrs(self)

Iterate over the AttrInfo objects that are contained in this fetch_request.

parseExtensionArgs(self, ax_args)

Given attribute exchange arguments, populate this FetchRequest.
Parameters:
ax_args - Attribute Exchange arguments from the request. As returned from Message.getArgs.
           (type=dict)
Raises:
KeyError - if the message is not consistent in its use of namespace aliases.
NotAXMessage - If ax_args does not include an Attribute Exchange mode.
AXError - If the data to be parsed does not follow the attribute exchange specification. At least when 'if_available' or 'required' is not specified for a particular attribute type.

Class Method Details

fromOpenIDRequest(cls, openid_request)

Extract a FetchRequest from an OpenID message
Parameters:
openid_request - The OpenID authentication request containing the attribute fetch request
           (type=openid.server.server.CheckIDRequest)
Returns:
The FetchRequest extracted from the message or None, if the message contained no AX extension.
           (type=FetchRequest or None)
Raises:
KeyError - if the AuthRequest is not consistent in its use of namespace aliases.
AXError - When parseExtensionArgs would raise same.

See Also: parseExtensionArgs


Instance Variable Details

requested_attributes

The attributes that have been requested thus far, indexed by the type URI.
Type:
{str:AttrInfo}

update_url

A URL that will accept responses for this attribute exchange request, even in the absence of the user who made this request.

Class Variable Details

mode

The type of this attribute exchange message. This must be overridden in subclasses.
Type:
NoneType
Value:
'fetch_request'                                                        

Generated by Epydoc 2.1 on Fri Dec 14 16:10:53 2007 http://epydoc.sf.net