Bases: object
Packs and unpacks payloads into receipts for transport.
Given a set of payload attributes, generate a Fernet receipt.
Return the creation time of a valid Fernet receipt.
Return a cryptography instance.
You can extend this class with a custom crypto @property to provide
your own receipt encoding / decoding. For example, using a different
cryptography library (e.g. python-keyczar
) or to meet arbitrary
security requirements.
This @property just needs to return an object that implements
encrypt(plaintext)
and decrypt(ciphertext)
.
Bases: object
Assemble the payload of a receipt.
user_id – identifier of the user in the receipt request
methods – list of authentication methods used
expires_at – datetime of the receipt’s expiration
the payload of a receipt
Attempt to convert value to bytes or return value.
value – value to attempt to convert to bytes
tuple containing boolean indicating whether user_id was stored as bytes and uuid value as bytes or the original value
Generate uuid.hex format based on byte string.
uuid_byte_string – uuid string to generate from
uuid hex formatted string
Compress UUID formatted strings to bytes.
uuid_string – uuid string to compress to bytes
a byte representation of the uuid
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.