Struct oauth2::Config [] [src]

pub struct Config { /* fields omitted */ }

Stores the configuration for an OAuth2 client.

Methods

impl Config
[src]

Initializes the OAuth2 client with the client ID, client secret, the base authorization URL and the URL ment for requesting the access token.

Appends a new scope to the authorization URL.

Allows setting a particular response type. Both &str and ResponseType work here.

The default response type is code.

Allows setting the redirect URL.

Allows setting a state parameter inside the authorization URL, which we'll be returned by the server after the authorization is over.

Produces the full authorization URL.

Deprecated since 1.0.0

: please use exchange_code instead

Exchanges a code produced by a successful authorization process with an access token.

See https://tools.ietf.org/html/rfc6749#section-4.1.3

Exchanges a code produced by a successful authorization process with an access token.

See https://tools.ietf.org/html/rfc6749#section-4.1.3

Requests an access token for the client credentials grant type.

See https://tools.ietf.org/html/rfc6749#section-4.4.2

Requests an access token for the password grant type.

See https://tools.ietf.org/html/rfc6749#section-4.3.2