Package openid :: Module association
[hide private]
[frames] | no frames]

Module association

source code

This module contains code for dealing with associations between consumers and servers. Associations contain a shared secret that is used to sign openid.mode=id_res messages.

Users of the library should not usually need to interact directly with associations. The store, server and consumer objects will create and manage the associations. The consumer and server code will make use of a SessionNegotiator when managing associations, which enables users to express a preference for what kind of associations should be allowed, and what kind of exchange should be done to establish the association.

Classes [hide private]
  SessionNegotiator
A session negotiator controls the allowed and preferred association types and association session types.
  Association
This class represents an association between a server and a consumer.
Functions [hide private]
 
getSessionTypes(assoc_type)
Return the allowed session types for a given association type
source code
 
checkSessionType(assoc_type, session_type)
Check to make sure that this pair of assoc type and session type are allowed
source code
 
getSecretSize(assoc_type) source code
Variables [hide private]
  all_association_types = ['HMAC-SHA1', 'HMAC-SHA256']
  supported_association_types = ['HMAC-SHA1', 'HMAC-SHA256']
  default_association_order = [('HMAC-SHA1', 'DH-SHA1'), ('HMAC-...
  only_encrypted_association_order = [('HMAC-SHA1', 'DH-SHA1'), ...
  default_negotiator = SessionNegotiator(default_association_order)
A SessionNegotiator that allows all association types that are specified by the OpenID specification.
  encrypted_negotiator = SessionNegotiator(only_encrypted_associ...
A SessionNegotiator that does not support 'no-encryption' associations.
  __package__ = 'openid'
Variables Details [hide private]

default_association_order

Value:
[('HMAC-SHA1', 'DH-SHA1'),
 ('HMAC-SHA1', 'no-encryption'),
 ('HMAC-SHA256', 'DH-SHA256'),
 ('HMAC-SHA256', 'no-encryption')]

only_encrypted_association_order

Value:
[('HMAC-SHA1', 'DH-SHA1'), ('HMAC-SHA256', 'DH-SHA256')]

default_negotiator

A SessionNegotiator that allows all association types that are specified by the OpenID specification. It prefers to use HMAC-SHA1/DH-SHA1, if it's available. If HMAC-SHA256 is not supported by your Python runtime, HMAC-SHA256 and DH-SHA256 will not be available.
Value:
SessionNegotiator(default_association_order)

encrypted_negotiator

A SessionNegotiator that does not support 'no-encryption' associations. It prefers HMAC-SHA1/DH-SHA1 association types if available.
Value:
SessionNegotiator(only_encrypted_association_order)