Package turbogears :: Package identity :: Module base

Module base

source code

The TurboGears identity management package.

Functions
 
set_identity_errors(errors) source code
 
get_failure_url(errors=None) source code
 
get_identity_errors() source code
 
create_default_provider()
Create default identity provider.
source code
 
was_login_attempted() source code
 
set_login_attempted(flag) source code
 
set_current_identity(identity) source code
 
set_current_provider(provider) source code
 
encrypt_pw_with_algorithm(algorithm, password)
Hash the given password with the specified algorithm.
source code
 
_encrypt_password(*args, **kwargs)
Hash the given password with the specified algorithm.
source code
 
encrypt_password(cleartext) source code
Variables
  current = IdentityWrapper()
  current_provider = ProviderWrapper()
Function Details

create_default_provider()

source code 

Create default identity provider.

Creates an identity provider according to what is found in the configuration file for the current TurboGears application

Returns an identity provider instance or raises an IdentityConfigurationException.

encrypt_pw_with_algorithm(algorithm, password)

source code 

Hash the given password with the specified algorithm.

Valid values for algorithm are 'md5' and 'sha1' or 'custom'. If the algorithm is 'custom', the config setting 'identity.custom_encryption' needs to be set to a dotted-notation path to a callable that takes an unencrypted password and gives back the password hash.

All other algorithms values will be essentially a no-op.

_encrypt_password(*args, **kwargs)

source code 

Hash the given password with the specified algorithm.

Valid values for algorithm are 'md5' and 'sha1' or 'custom'. If the algorithm is 'custom', the config setting 'identity.custom_encryption' needs to be set to a dotted-notation path to a callable that takes an unencrypted password and gives back the password hash.

All other algorithms values will be essentially a no-op.