[−][src]Struct onedrive_api::AuthClient
Methods
impl AuthClient[src]
pub fn new(
client_id: String,
permission: Permission,
redirect_uri: String
) -> Self[src]
client_id: String,
permission: Permission,
redirect_uri: String
) -> Self
Create a client for authorization.
pub fn get_token_auth_url(&self) -> String[src]
pub fn get_code_auth_url(&self) -> String[src]
pub fn login_with_code(
&self,
code: &str,
client_secret: Option<&str>
) -> Result<Token>[src]
&self,
code: &str,
client_secret: Option<&str>
) -> Result<Token>
pub fn login_with_refresh_token(
&self,
refresh_token: &str,
client_secret: Option<&str>
) -> Result<Token>[src]
&self,
refresh_token: &str,
client_secret: Option<&str>
) -> Result<Token>
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
Trait Implementations
Auto Trait Implementations
impl Send for AuthClient
impl Sync for AuthClient
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,