pub struct WorkloadIdentityCredential { /* 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 WorkloadIdentityCredential
impl WorkloadIdentityCredential
Sourcepub fn new<T>(
http_client: Arc<dyn HttpClient>,
authority_host: Url,
tenant_id: String,
client_id: String,
token: T,
) -> Self
pub fn new<T>( http_client: Arc<dyn HttpClient>, authority_host: Url, tenant_id: String, client_id: String, token: T, ) -> Self
Create a new WorkloadIdentityCredential
pub fn create( options: impl Into<TokenCredentialOptions>, ) -> Result<WorkloadIdentityCredential>
Trait Implementations§
Source§impl Debug for WorkloadIdentityCredential
impl Debug for WorkloadIdentityCredential
Source§impl TokenCredential for WorkloadIdentityCredential
impl TokenCredential for WorkloadIdentityCredential
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 WorkloadIdentityCredential
impl !RefUnwindSafe for WorkloadIdentityCredential
impl Send for WorkloadIdentityCredential
impl Sync for WorkloadIdentityCredential
impl Unpin for WorkloadIdentityCredential
impl !UnwindSafe for WorkloadIdentityCredential
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