Closed
Description
My first thought was that resource
should be a list of scopes instead to match Microsoft Authentication Library MSAL v2, but I'm not sure.
/// Represents a credential capable of providing an OAuth token.
#[async_trait::async_trait]
pub trait TokenCredential {
/// Gets a `TokenResponse` for the specified resource
async fn get_token(&self, resource: &str) -> Result<TokenResponse, AzureError>;
}
My guess is that resource
here is modeled after he az command line and is the resource identifier. I think it becomes the scope
query param. In MSAL v2, it is a space delimited list.
Links: