Enum oxide_auth::primitives::grant::Value [−][src]
Expand description
Wraps the data for an extension as a string with access restrictions.
This is a generic way for extensions to store their data in a universal, encoded form. It is also able to indicate the intended readers for such an extension so that backends can ensure that private extension data is properly encrypted even when present in a self-encoded access token.
Some extensions have semantics where the presence alone is the stored data, so storing data is optional and storing no data is distinct from not attaching any extension instance at all.
Variants
An extension that the token owner is allowed to read and interpret.
Identifies an extenion whose content and/or existance MUST be kept secret.
Implementations
Creates an extension whose presence and content can be unveiled by the token holder.
Anyone in possession of the token corresponding to such a grant is potentially able to read the content of a public extension.
Creates an extension with secret content only visible for the server.
Token issuers should take special care to protect the content and the identifier of such an extension from being interpreted or correlated by the token holder.
Inspect the public value.
Returns an Err if this is not a public extension, None if the extension has no value
but consists only of the key, and Some(_) otherwise.
Convert into the public value.
Returns an Err if this is not a public extension, None if the extension has no value
but consists only of the key, and Some(_) otherwise.
Inspect the private value.
Returns an Err if this is not a private extension, None if the extension has no value
but consists only of the key, and Some(_) otherwise.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Value
impl UnwindSafe for Value
Blanket Implementations
Mutably borrows from an owned value. Read more