pub struct ClientSecretCredential { /* private fields */ }
Expand description
Enables authentication to Azure Active Directory using a client secret that was generated for an App Registration.
More information on how to configure a client secret can be found here: https://docs.microsoft.com/azure/active-directory/develop/quickstart-configure-app-access-web-apis#add-credentials-to-your-web-application
Implementations§
Source§impl ClientSecretCredential
impl ClientSecretCredential
Sourcepub fn new(
http_client: Arc<dyn HttpClient>,
authority_host: Url,
tenant_id: String,
client_id: String,
client_secret: String,
) -> ClientSecretCredential
pub fn new( http_client: Arc<dyn HttpClient>, authority_host: Url, tenant_id: String, client_id: String, client_secret: String, ) -> ClientSecretCredential
Create a new ClientSecretCredential
pub fn create( options: impl Into<TokenCredentialOptions>, ) -> Result<ClientSecretCredential>
Trait Implementations§
Source§impl Debug for ClientSecretCredential
impl Debug for ClientSecretCredential
Source§impl TokenCredential for ClientSecretCredential
impl TokenCredential for ClientSecretCredential
Source§fn clear_cache<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_cache<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clear the credential’s cache.
Source§fn get_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scopes: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<AccessToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scopes: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<AccessToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Gets a
AccessToken
for the specified resourceAuto Trait Implementations§
impl !Freeze for ClientSecretCredential
impl !RefUnwindSafe for ClientSecretCredential
impl Send for ClientSecretCredential
impl Sync for ClientSecretCredential
impl Unpin for ClientSecretCredential
impl !UnwindSafe for ClientSecretCredential
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