Package pyxmpp2 :: Package sasl :: Module scram
[hide private]

Module scram

SCRAM authentication mechanisms for PyXMPP SASL implementation.

Normative reference:
Classes [hide private]
  SCRAMOperations
Functions used during SCRAM authentication and defined in the RFC.
  SCRAMClientAuthenticator
Provides SCRAM SASL authentication for a client.
  SCRAMServerAuthenticator
Provides SCRAM SASL authentication for a server.
  SCRAM_SHA_1_ClientAuthenticator
The SCRAM-SHA-1 client authenticator.
  SCRAM_SHA_1_PLUS_ClientAuthenticator
The SCRAM-SHA-1-PLUS client authenticator.
  SCRAM_SHA_1_ServerAuthenticator
The SCRAM-SHA-1 server authenticator.
  SCRAM_SHA_1_PLUS_ServerAuthenticator
The SCRAM-SHA-1-PLUS server authenticator.
Variables [hide private]
  logger = logging.getLogger("pyxmpp2.sasl.scram")
  HASH_FACTORIES = {'MD-5': <built-in function openssl_md5>, 'SH...
  VALUE_CHARS_RE = re.compile(r'^[!-\+--~]+$')
  _QUOTED_VALUE_RE = '(?:[\\x21-\\x2B\\x2D-\\x7E]|=2C|=3D)+'
  CLIENT_FIRST_MESSAGE_RE = re.compile(r'^(?P<gs2_header>(?:y|n|...
  SERVER_FIRST_MESSAGE_RE = re.compile(r'^(?P<mext>m=[^\x00=]+,)...
  CLIENT_FINAL_MESSAGE_RE = re.compile(r'(?P<without_proof>c=(?P...
  SERVER_FINAL_MESSAGE_RE = re.compile(r'^(?:e=(?P<error>[^,]+)|...
Variables Details [hide private]

HASH_FACTORIES

Value:
{'MD-5': <built-in function openssl_md5>,
 'SHA-1': <built-in function openssl_sha1>,
 'SHA-224': <built-in function openssl_sha224>,
 'SHA-256': <built-in function openssl_sha256>,
 'SHA-384': <built-in function openssl_sha384>,
 'SHA-512': <built-in function openssl_sha512>}

CLIENT_FIRST_MESSAGE_RE

Value:
re.compile(r'^(?P<gs2_header>(?:y|n|p=(?P<cb_name>[a-zA-z0-9\.-]+)),(?\
:a=(?P<authzid>(?:[!-\+--~]|=2C|=3D)+))?,)(?P<client_first_bare>(?P<me\
xt>m=[^\x00=]+,)?n=(?P<username>(?:[!-\+--~]|=2C|=3D)+),r=(?P<nonce>[!\
-\+--~]+)(?:,.*)?)$')

SERVER_FIRST_MESSAGE_RE

Value:
re.compile(r'^(?P<mext>m=[^\x00=]+,)?r=(?P<nonce>[!-\+--~]+),s=(?P<sal\
t>[a-zA-Z0-9/\+=]+),i=(?P<iteration_count>\d+)(?:,.*)?$')

CLIENT_FINAL_MESSAGE_RE

Value:
re.compile(r'(?P<without_proof>c=(?P<cb>[a-zA-Z0-9/\+=]+),(?:r=(?P<non\
ce>[!-\+--~]+))(?:,.*)?),p=(?P<proof>[a-zA-Z0-9/\+=]+)$')

SERVER_FINAL_MESSAGE_RE

Value:
re.compile(r'^(?:e=(?P<error>[^,]+)|v=(?P<verifier>[a-zA-Z0-9/\+=]+)(?\
:,.*)?)$')