pub struct AuthorizationCodeSpaCredential { /* private fields */ }
Expand description
The OAuth 2.0 authorization code grant type, or auth code flow, enables a client application to obtain authorized access to protected resources like web APIs. The auth code flow requires a user-agent that supports redirection from the authorization server (the Microsoft identity platform) back to your application. For example, a web browser, desktop, or mobile application operated by a user to sign in to your app and access their data. https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow
Implementations§
Source§impl AuthorizationCodeSpaCredential
impl AuthorizationCodeSpaCredential
pub fn new( tenant_id: impl AsRef<str>, client_id: impl AsRef<str>, authorization_code: impl AsRef<str>, ) -> IdentityResult<AuthorizationCodeSpaCredential>
pub fn new_with_redirect_uri( tenant_id: impl AsRef<str>, client_id: impl AsRef<str>, authorization_code: impl AsRef<str>, redirect_uri: Url, ) -> IdentityResult<AuthorizationCodeSpaCredential>
pub fn with_refresh_token<T: AsRef<str>>(&mut self, refresh_token: T)
pub fn builder( authorization_code: impl AsRef<str>, client_id: impl AsRef<str>, ) -> AuthorizationCodeSpaCredentialBuilder
Trait Implementations§
Source§impl Clone for AuthorizationCodeSpaCredential
impl Clone for AuthorizationCodeSpaCredential
Source§fn clone(&self) -> AuthorizationCodeSpaCredential
fn clone(&self) -> AuthorizationCodeSpaCredential
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl From<AuthorizationCodeSpaCredential> for AuthorizationCodeSpaCredentialBuilder
impl From<AuthorizationCodeSpaCredential> for AuthorizationCodeSpaCredentialBuilder
Source§fn from(credential: AuthorizationCodeSpaCredential) -> Self
fn from(credential: AuthorizationCodeSpaCredential) -> Self
Converts to this type from the input type.
Source§impl From<AuthorizationCodeSpaCredential> for PublicClientApplication<AuthorizationCodeSpaCredential>
impl From<AuthorizationCodeSpaCredential> for PublicClientApplication<AuthorizationCodeSpaCredential>
Source§fn from(value: AuthorizationCodeSpaCredential) -> Self
fn from(value: AuthorizationCodeSpaCredential) -> Self
Converts to this type from the input type.
Source§impl TokenCache for AuthorizationCodeSpaCredential
impl TokenCache for AuthorizationCodeSpaCredential
type Token = Token
fn get_token_silent(&mut self) -> Result<Self::Token, AuthExecutionError>
fn get_token_silent_async<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Self::Token, AuthExecutionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn with_force_token_refresh(&mut self, force_token_refresh: ForceTokenRefresh)
Source§impl TokenCredentialExecutor for AuthorizationCodeSpaCredential
impl TokenCredentialExecutor for AuthorizationCodeSpaCredential
Source§fn basic_auth(&self) -> Option<(String, String)>
fn basic_auth(&self) -> Option<(String, String)>
Basic auth is not used in Spas because they do not use a client secret.
fn form_urlencode(&mut self) -> IdentityResult<HashMap<String, String>>
fn client_id(&self) -> &Uuid
fn azure_cloud_instance(&self) -> AzureCloudInstance
fn app_config(&self) -> &AppConfig
fn uri(&mut self) -> IdentityResult<Url>
fn request_parts(&mut self) -> IdentityResult<AuthorizationRequestParts>
fn build_request(&mut self) -> AuthExecutionResult<RequestBuilder>
fn build_request_async(&mut self) -> AuthExecutionResult<RequestBuilder>
fn extra_header_parameters(&self) -> &HeaderMap
fn issuer(&self) -> Result<Url, ParseError>
fn extra_query_parameters(&self) -> &HashMap<String, String>
fn execute(&mut self) -> AuthExecutionResult<Response>
fn execute_async<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = AuthExecutionResult<Response>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for AuthorizationCodeSpaCredential
impl !RefUnwindSafe for AuthorizationCodeSpaCredential
impl Send for AuthorizationCodeSpaCredential
impl Sync for AuthorizationCodeSpaCredential
impl Unpin for AuthorizationCodeSpaCredential
impl !UnwindSafe for AuthorizationCodeSpaCredential
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more