pub struct ImdsManagedIdentityCredential { /* private fields */ }
Expand description
Attempts authentication using a managed identity that has been assigned to the deployment environment.
This authentication type works in Azure VMs, App Service and Azure Functions applications, as well as the Azure Cloud Shell
Built up from docs at https://docs.microsoft.com/azure/app-service/overview-managed-identity#using-the-rest-protocol
Implementations§
source§impl ImdsManagedIdentityCredential
impl ImdsManagedIdentityCredential
sourcepub fn new(http_client: Arc<dyn HttpClient>) -> Self
pub fn new(http_client: Arc<dyn HttpClient>) -> Self
Creates a new ImdsManagedIdentityCredential
using the given HttpClient
.
sourcepub fn with_object_id<A>(self, object_id: A) -> Selfwhere
A: Into<String>,
pub fn with_object_id<A>(self, object_id: A) -> Selfwhere
A: Into<String>,
Specifies the object id associated with a user assigned managed service identity resource that should be used to retrieve the access token.
The values of client_id and msi_res_id are discarded, as only one id parameter may be set when getting a token.
sourcepub fn with_client_id<A>(self, client_id: A) -> Selfwhere
A: Into<String>,
pub fn with_client_id<A>(self, client_id: A) -> Selfwhere
A: Into<String>,
Specifies the application id (client id) associated with a user assigned managed service identity resource that should be used to retrieve the access token.
The values of object_id and msi_res_id are discarded, as only one id parameter may be set when getting a token.
sourcepub fn with_identity<A>(self, msi_res_id: A) -> Selfwhere
A: Into<String>,
pub fn with_identity<A>(self, msi_res_id: A) -> Selfwhere
A: Into<String>,
Specifies the ARM resource id of the user assigned managed service identity resource that should be used to retrieve the access token.
The values of object_id and client_id are discarded, as only one id parameter may be set when getting a token.