#[non_exhaustive]pub enum RequestedTokenType {
AccessToken,
Omit,
Custom(String),
}Expand description
RFC 8693 §2.1 requested_token_type - an OPTIONAL request parameter.
The RFC states that when the requested type is unspecified, “the issued
token type is at the discretion of the authorization server”. Self::Omit
expresses that, which is otherwise unreachable.
Deserialised from a plain TOML string: "access_token" and "omit" map to
the corresponding variants, and any other string becomes Self::Custom.
A misspelling such as "acess_token" is therefore accepted as a custom
token-type URI and sent verbatim rather than rejected - unavoidable, since
RFC 8693 §3 permits arbitrary URIs here.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AccessToken
Send urn:ietf:params:oauth:token-type:access_token.
Default, preserving the behaviour of every release before 3.8.0, which always sent this value.
Omit
Omit requested_token_type, letting the authorization server choose.
Custom(String)
Send a specific token-type URI (RFC 8693 §3).
Trait Implementations§
Source§impl Clone for RequestedTokenType
impl Clone for RequestedTokenType
Source§fn clone(&self) -> RequestedTokenType
fn clone(&self) -> RequestedTokenType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RequestedTokenType
impl Debug for RequestedTokenType
Source§impl Default for RequestedTokenType
impl Default for RequestedTokenType
Source§fn default() -> RequestedTokenType
fn default() -> RequestedTokenType
Source§impl<'de> Deserialize<'de> for RequestedTokenType
impl<'de> Deserialize<'de> for RequestedTokenType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for RequestedTokenType
Source§impl From<String> for RequestedTokenType
impl From<String> for RequestedTokenType
Source§impl PartialEq for RequestedTokenType
impl PartialEq for RequestedTokenType
impl StructuralPartialEq for RequestedTokenType
Auto Trait Implementations§
impl Freeze for RequestedTokenType
impl RefUnwindSafe for RequestedTokenType
impl Send for RequestedTokenType
impl Sync for RequestedTokenType
impl Unpin for RequestedTokenType
impl UnsafeUnpin for RequestedTokenType
impl UnwindSafe for RequestedTokenType
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.