[−][src]Struct onedrive_api::Auth
Implementations
impl Auth[src]
pub fn new(
client_id: String,
permission: Permission,
redirect_uri: String
) -> Self[src]
client_id: String,
permission: Permission,
redirect_uri: String
) -> Self
Create an new instance for OAuth2 to Microsoft Graph with specified client identifier and permission.
pub fn new_with_client(
client: Client,
client_id: String,
permission: Permission,
redirect_uri: String
) -> Self[src]
client: Client,
client_id: String,
permission: Permission,
redirect_uri: String
) -> Self
Same as Auth::new but with custom reqwest::Client.
pub fn client_id(&self) -> &str[src]
Get the client_id used to create this instance.
pub fn permission(&self) -> &Permission[src]
Get the permission used to create this instance.
pub fn redirect_uri(&self) -> &str[src]
Get the redirect_uri used to create this instance.
pub fn code_auth_url(&self) -> String[src]
pub async fn login_with_code<'_, '_, '_>(
&'_ self,
code: &'_ str,
client_secret: Option<&'_ str>
) -> Result<TokenResponse>[src]
&'_ self,
code: &'_ str,
client_secret: Option<&'_ str>
) -> Result<TokenResponse>
pub async fn login_with_refresh_token<'_, '_, '_>(
&'_ self,
refresh_token: &'_ str,
client_secret: Option<&'_ str>
) -> Result<TokenResponse>[src]
&'_ self,
refresh_token: &'_ str,
client_secret: Option<&'_ str>
) -> Result<TokenResponse>
Login using a refresh token.
This requires offline_access, and will ALWAYS return
a new refresh_token if success.
Panic
Panic if the current Auth is created with no
offline_access permission.
See also
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Auth
impl Send for Auth
impl Sync for Auth
impl Unpin for Auth
impl !UnwindSafe for Auth
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,