[][src]Struct oauth2::AuthorizationRequest

pub struct AuthorizationRequest<'a> { /* fields omitted */ }

A request to the authorization endpoint

Implementations

impl<'a> AuthorizationRequest<'a>[src]

pub fn add_scope(self, scope: Scope) -> Self[src]

Appends a new scope to the authorization URL.

pub fn add_extra_param<N, V>(self, name: N, value: V) -> Self where
    N: Into<Cow<'a, str>>,
    V: Into<Cow<'a, str>>, 
[src]

Appends an extra param to the authorization URL.

This method allows extensions to be used without direct support from this crate. If name conflicts with a parameter managed by this crate, the behavior is undefined. In particular, do not set parameters defined by RFC 6749 or RFC 7636.

Security Warning

Callers should follow the security recommendations for any OAuth2 extensions used with this function, which are beyond the scope of RFC 6749.

pub fn use_implicit_flow(self) -> Self[src]

Enables the Implicit Grant flow.

pub fn set_response_type(self, response_type: &ResponseType) -> Self[src]

Enables custom flows other than the code and token (implicit flow) grant.

pub fn set_pkce_challenge(self, pkce_code_challenge: PkceCodeChallenge) -> Self[src]

Enables the use of Proof Key for Code Exchange (PKCE).

PKCE is highly recommended for all public clients (i.e., those for which there is no client secret or for which the client secret is distributed with the client, such as in a native, mobile app, or browser app).

pub fn set_redirect_url(self, redirect_url: Cow<'a, RedirectUrl>) -> Self[src]

Overrides the redirect_url to the one specified.

pub fn url(self) -> (Url, CsrfToken)[src]

Returns the full authorization URL and CSRF state for this authorization request.

Trait Implementations

impl<'a> Debug for AuthorizationRequest<'a>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,