Struct graph_rs_sdk::oauth::GrantSelector
source · pub struct GrantSelector<T> { /* private fields */ }Implementations§
source§impl GrantSelector<AccessTokenGrant>
impl GrantSelector<AccessTokenGrant>
sourcepub fn token_flow(self) -> ImplicitGrant
pub fn token_flow(self) -> ImplicitGrant
Create a new instance for token flow.
§See
Microsoft Token Flow Authorization
§Example
let open_id = oauth.build().token_flow();sourcepub fn code_flow(self) -> AccessTokenGrant
pub fn code_flow(self) -> AccessTokenGrant
Create a new instance for code flow.
§See
Microsoft Code Flow Authorization
§Example
let open_id = oauth.build().code_flow();sourcepub fn implicit_grant(self) -> ImplicitGrant
pub fn implicit_grant(self) -> ImplicitGrant
Create a new instance for authorization code grant.
§See
Authorization Code Grant for OAuth 2.0
§Example
let open_id = oauth.build().authorization_code_grant();sourcepub fn device_code(self) -> DeviceCodeGrant
pub fn device_code(self) -> DeviceCodeGrant
Create a new instance for device authorization code grant.
§See
Microsoft identity platform and the OAuth 2.0 device authorization grant flow
§Example
let device_code_handler = oauth.build().device_code();sourcepub fn open_id_connect(self) -> AccessTokenGrant
pub fn open_id_connect(self) -> AccessTokenGrant
sourcepub fn client_credentials(self) -> AccessTokenGrant
pub fn client_credentials(self) -> AccessTokenGrant
sourcepub fn resource_owner_password_credentials(self) -> AccessTokenGrant
pub fn resource_owner_password_credentials(self) -> AccessTokenGrant
Create a new instance for the resource owner password credentials grant.
§See
Microsoft Resource Owner Password Credentials
§Example
let open_id = oauth.build().resource_owner_password_credentials();source§impl GrantSelector<AsyncAccessTokenGrant>
impl GrantSelector<AsyncAccessTokenGrant>
sourcepub fn token_flow(self) -> ImplicitGrant
pub fn token_flow(self) -> ImplicitGrant
Create a new instance for token flow.
§See
Microsoft Token Flow Authorization
§Example
let open_id = oauth.build().token_flow();sourcepub fn code_flow(self) -> AsyncAccessTokenGrant
pub fn code_flow(self) -> AsyncAccessTokenGrant
Create a new instance for code flow.
§See
Microsoft Code Flow Authorization
§Example
let open_id = oauth.build().code_flow();sourcepub fn implicit_grant(self) -> ImplicitGrant
pub fn implicit_grant(self) -> ImplicitGrant
Create a new instance for authorization code grant.
§See
Authorization Code Grant for OAuth 2.0
§Example
let open_id = oauth.build().authorization_code_grant();sourcepub fn device_code(self) -> AsyncDeviceCodeGrant
pub fn device_code(self) -> AsyncDeviceCodeGrant
Create a new instance for device authorization code grant.
§See
Microsoft identity platform and the OAuth 2.0 device authorization grant flow
§Example
let device_code_handler = oauth.build().device_code();sourcepub fn open_id_connect(self) -> AsyncAccessTokenGrant
pub fn open_id_connect(self) -> AsyncAccessTokenGrant
sourcepub fn client_credentials(self) -> AsyncAccessTokenGrant
pub fn client_credentials(self) -> AsyncAccessTokenGrant
sourcepub fn resource_owner_password_credentials(self) -> AsyncAccessTokenGrant
pub fn resource_owner_password_credentials(self) -> AsyncAccessTokenGrant
Create a new instance for the resource owner password credentials grant.
§See
Microsoft Resource Owner Password Credentials
§Example
let open_id = oauth.build().resource_owner_password_credentials();