Struct splinter::oauth::OAuthClient[][src]

pub struct OAuthClient { /* fields omitted */ }
Expand description

An OAuth2 client for Splinter

This client currently supports OAuth2 authorization code grants (https://tools.ietf.org/html/rfc6749#section-4.1).

Implementations

Generates the URL that the end user should be redirected to for authorization

Arguments
  • client_redirect_url - The endpoint that Splinter will redirect to after it has completed authorization and the code exchange

Exchanges the given authorization code for an access token and the client redirect URL provided in the original auth request, represented by a String.

Arguments
  • auth_code - The authorization code that was supplied by the OAuth provider
  • csrf_token - The CSRF token that was provided in the original auth request, which is used to prevent CSRF attacks and to correlate the auth code with the original auth request.

Exchanges the given refresh token for an access token.

Attempts to get the subject that the given access token is for from the OAuth server. This method will return Ok(None) if the access token could not be resolved to a subject.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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.

Convert self to an expression for Diesel’s query builder. Read more

Convert &self to an expression for Diesel’s query builder. Read more

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)

recently added

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more