[][src]Struct onedrive_api::AuthClient

pub struct AuthClient { /* fields omitted */ }

The client for requests relative to authentication.

See also

Microsoft Docs

Methods

impl AuthClient[src]

pub fn new(
    client_id: String,
    permission: Permission,
    redirect_uri: String
) -> Self
[src]

Create a client for authorization.

pub fn get_token_auth_url(&self) -> String[src]

Get the URL for web browser for token flow authentication.

See also

Microsoft Docs

pub fn get_code_auth_url(&self) -> String[src]

Get the URL for web browser for code flow authentication.

See also

Microsoft Docs

pub fn login_with_code(
    &self,
    code: &str,
    client_secret: Option<&str>
) -> Result<Token>
[src]

Login using a code in code flow authentication.

See also

Microsoft Docs

pub fn login_with_refresh_token(
    &self,
    refresh_token: &str,
    client_secret: Option<&str>
) -> Result<Token>
[src]

Login using a refresh token.

This requires offline access, and will always returns new refresh token if success.

Panic

Panic if the current AuthClient is created with no offline_access permission.

See also

Microsoft Docs

Trait Implementations

impl Debug for AuthClient[src]

Auto Trait Implementations

impl Send for AuthClient

impl Sync for AuthClient

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T