Expand description
AES-256-GCM encryption utilities for OAuth tokens.
When AccountConfig::encrypt_oauth_tokens is true, access tokens,
refresh tokens, and ID tokens are encrypted before being persisted and
decrypted transparently on read.
Structs§
- Encrypted
Token Set - A set of OAuth tokens (access, refresh, id) after conditional encryption.
Functions§
- decrypt_
token - Decrypt a base64-encoded
nonce || ciphertextstring using AES-256-GCM. - encrypt_
token - Encrypt a plaintext string using AES-256-GCM.
- encrypt_
token_ set - Read
encrypt_oauth_tokensandsecretfrom the auth context and conditionally encrypt a full set of OAuth tokens in one call. - maybe_
decrypt - Conditionally decrypt a token value. Returns the original value when encryption is disabled, or the decrypted value when enabled.
- maybe_
encrypt - Conditionally encrypt a token value. Returns the original value when encryption is disabled, or the encrypted value when enabled.