pymap.user
¶
- class pymap.user.Passwords(config)[source]¶
Helper utility for performing password operations in a CPU bound pool.
- Parameters:
config (IMAPConfig) – The IMAP config object.
- async hash_password(password: str) str [source]¶
- async hash_password(password: None) None
Hash the given password using the configured hash algorithm.
- Parameters:
password – The password string to hash.
- async check_password(identity, credentials)[source]¶
Check the credentials against the SASL identity.
- Parameters:
identity (Identity) – The identity to check against.
credentials (ServerCredentials) – The credentials to check with.
- Return type:
- class pymap.user.UserMetadata(config, name, entity_tag=None, previous_entity_tag=None, password=None, token_key=None, roles=frozenset({}), params=<pymap.frozen.FrozenDict object>)[source]¶
Defines the attributes associated with a user identity.
- Parameters:
- config: IMAPConfig¶
The config object.
- params: frozendict[str, str] = <pymap.frozen.FrozenDict object>¶
Additional parameters associated with the user.
- compare_secret(value)[source]¶
Compare the identity’s secret with the given secret. The comparison must account for things like hashing or token algorithms.
- get_clear_secret()[source]¶
Return the cleartext secret string if it is available.
- Return type:
str | None
- classmethod new_entity_tag()[source]¶
Generate a new random value for
entity_tag
.- Return type: