Struct oauth2::StandardToken
source · [−]pub struct StandardToken { /* private fields */ }
Expand description
Standard OAuth2 token response.
This struct includes the fields defined in
Section 5.1 of RFC 6749, as well as
extensions defined by the EF
type parameter.
Trait Implementations
sourceimpl Clone for StandardToken
impl Clone for StandardToken
sourcefn clone(&self) -> StandardToken
fn clone(&self) -> StandardToken
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for StandardToken
impl Debug for StandardToken
sourceimpl<'de> Deserialize<'de> for StandardToken
impl<'de> Deserialize<'de> for StandardToken
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<StandardToken> for StandardToken
impl PartialEq<StandardToken> for StandardToken
sourcefn eq(&self, other: &StandardToken) -> bool
fn eq(&self, other: &StandardToken) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &StandardToken) -> bool
fn ne(&self, other: &StandardToken) -> bool
This method tests for !=
.
sourceimpl Serialize for StandardToken
impl Serialize for StandardToken
sourceimpl Token for StandardToken
impl Token for StandardToken
sourcefn access_token(&self) -> &AccessToken
fn access_token(&self) -> &AccessToken
REQUIRED. The access token issued by the authorization server.
sourcefn token_type(&self) -> &TokenType
fn token_type(&self) -> &TokenType
REQUIRED. The type of the token issued as described in
Section 7.1.
Value is case insensitive and deserialized to the generic TokenType
parameter.
sourcefn expires_in(&self) -> Option<Duration>
fn expires_in(&self) -> Option<Duration>
RECOMMENDED. The lifetime in seconds of the access token. For example, the value 3600 denotes that the access token will expire in one hour from the time the response was generated. If omitted, the authorization server SHOULD provide the expiration time via other means or document the default value.
sourcefn refresh_token(&self) -> Option<&RefreshToken>
fn refresh_token(&self) -> Option<&RefreshToken>
OPTIONAL. The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in Section 6.
sourcefn scopes(&self) -> Option<&Vec<Scope>>
fn scopes(&self) -> Option<&Vec<Scope>>
OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED. The
scipe of the access token as described by
Section 3.3. If included in the response,
this space-delimited field is parsed into a Vec
of individual scopes. If omitted from
the response, this field is None
.
impl StructuralPartialEq for StandardToken
Auto Trait Implementations
impl RefUnwindSafe for StandardToken
impl Send for StandardToken
impl Sync for StandardToken
impl Unpin for StandardToken
impl UnwindSafe for StandardToken
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more