[][src]Enum graph_rs_sdk::oauth::graphdiscovery::GraphDiscovery

pub enum GraphDiscovery {
    V1,
    V2,
    Tenant(String),
}

Variants

V1
V2
Tenant(String)

Implementations

impl GraphDiscovery[src]

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

Get the URL for the public keys used by the Microsoft identity platform to sign security tokens.

Example

let url = GraphDiscovery::V1.url();
println!("{}", url);

pub fn signing_keys<T>(self) -> Result<T, OAuthError> where
    T: for<'de> Deserialize<'de>, 
[src]

Get the public keys used by the Microsoft identity platform to sign security tokens.

Example

let keys: serde_json::Value = GraphDiscovery::V1.signing_keys().unwrap();
println!("{:#?}", keys);

pub async fn async_signing_keys<T>(self) -> Result<T, OAuthError> where
    T: for<'de> Deserialize<'de>, 
[src]

Get the public keys used by the Microsoft identity platform to sign security tokens.

Example

let keys: serde_json::Value = GraphDiscovery::V1.async_signing_keys().await.unwrap();
println!("{:#?}", keys);

pub fn oauth(self) -> Result<OAuth, OAuthError>[src]

Automatically convert the public keys used by the Microsoft identity platform to sign security tokens into an OAuth object. This will get the common urls for authorization and access tokens and insert them into OAuth.

Example

let oauth = GraphDiscovery::V1.oauth().unwrap();
println!("{:#?}", oauth);

pub async fn async_oauth(self) -> Result<OAuth, OAuthError>[src]

Automatically convert the public keys used by the Microsoft identity platform to sign security tokens into an OAuth object. This will get the common urls for authorization and access tokens and insert them into OAuth.

Example

let oauth = GraphDiscovery::V1.async_oauth().await.unwrap();
println!("{:#?}", oauth);

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> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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.