Struct openidconnect::StandardTokenResponse [−][src]
pub struct StandardTokenResponse<EF, TT> where
EF: ExtraTokenFields,
TT: TokenType, { /* fields omitted */ }
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.
Implementations
pub fn new(
access_token: AccessToken,
token_type: TT,
extra_fields: EF
) -> StandardTokenResponse<EF, TT>
pub fn new(
access_token: AccessToken,
token_type: TT,
extra_fields: EF
) -> StandardTokenResponse<EF, TT>
Instantiate a new OAuth2 token response.
Set the access_token
field.
Set the token_type
field.
Set the expires_in
field.
Set the refresh_token
field.
Extra fields defined by the client application.
Set the extra fields defined by the client application.
Trait Implementations
impl<EF, TT> Clone for StandardTokenResponse<EF, TT> where
EF: Clone + ExtraTokenFields,
TT: Clone + TokenType,
impl<EF, TT> Clone for StandardTokenResponse<EF, TT> where
EF: Clone + ExtraTokenFields,
TT: Clone + TokenType,
impl<EF, TT> Debug for StandardTokenResponse<EF, TT> where
EF: Debug + ExtraTokenFields,
TT: Debug + TokenType,
impl<EF, TT> Debug for StandardTokenResponse<EF, TT> where
EF: Debug + ExtraTokenFields,
TT: Debug + TokenType,
impl<'de, EF, TT> Deserialize<'de> for StandardTokenResponse<EF, TT> where
EF: ExtraTokenFields,
TT: TokenType,
impl<'de, EF, TT> Deserialize<'de> for StandardTokenResponse<EF, TT> where
EF: ExtraTokenFields,
TT: TokenType,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<StandardTokenResponse<EF, TT>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<StandardTokenResponse<EF, TT>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<EF, TT> Serialize for StandardTokenResponse<EF, TT> where
EF: ExtraTokenFields,
TT: TokenType,
impl<EF, TT> Serialize for StandardTokenResponse<EF, TT> where
EF: ExtraTokenFields,
TT: TokenType,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<AC, EF, GC, JE, JS, JT, TT> TokenResponse<AC, GC, JE, JS, JT, TT> for StandardTokenResponse<IdTokenFields<AC, EF, GC, JE, JS, JT>, TT> where
AC: AdditionalClaims,
EF: ExtraTokenFields,
GC: GenderClaim,
JE: JweContentEncryptionAlgorithm<JT>,
JS: JwsSigningAlgorithm<JT>,
JT: JsonWebKeyType,
TT: TokenType,
impl<AC, EF, GC, JE, JS, JT, TT> TokenResponse<AC, GC, JE, JS, JT, TT> for StandardTokenResponse<IdTokenFields<AC, EF, GC, JE, JS, JT>, TT> where
AC: AdditionalClaims,
EF: ExtraTokenFields,
GC: GenderClaim,
JE: JweContentEncryptionAlgorithm<JT>,
JS: JwsSigningAlgorithm<JT>,
JT: JsonWebKeyType,
TT: TokenType,
impl<EF, TT> TokenResponse<TT> for StandardTokenResponse<EF, TT> where
EF: ExtraTokenFields,
TT: TokenType,
impl<EF, TT> TokenResponse<TT> for StandardTokenResponse<EF, TT> where
EF: ExtraTokenFields,
TT: TokenType,
REQUIRED. The access token issued by the authorization server.
REQUIRED. The type of the token issued as described in
Section 7.1.
Value is case insensitive and deserialized to the generic TokenType
parameter.
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.
OPTIONAL. The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in Section 6.
OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED. The
scope 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
.
Auto Trait Implementations
impl<EF, TT> RefUnwindSafe for StandardTokenResponse<EF, TT> where
EF: RefUnwindSafe,
TT: RefUnwindSafe,
impl<EF, TT> Send for StandardTokenResponse<EF, TT> where
EF: Send,
TT: Send,
impl<EF, TT> Sync for StandardTokenResponse<EF, TT> where
EF: Sync,
TT: Sync,
impl<EF, TT> Unpin for StandardTokenResponse<EF, TT> where
EF: Unpin,
TT: Unpin,
impl<EF, TT> UnwindSafe for StandardTokenResponse<EF, TT> where
EF: UnwindSafe,
TT: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self