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

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.

Set the scopes field.

Extra fields defined by the client application.

Set the extra fields defined by the client application.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Returns the ID token provided by the token response. Read more

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.