azure-sdk-for-net icon indicating copy to clipboard operation
azure-sdk-for-net copied to clipboard

[FEATURE REQ]Export AuthorizationUri in ChallengeBasedAuthenticationPolicy

Open Danieladu opened this issue 1 year ago • 1 comments

Library name

Azure.Identity

Please describe the feature.

We are now using KeyClient to access the keys in keyvault. And we would use customized TokenCreential to get the Bearer token. Our method requires "authorizationUri" which is parsed from WWW-Authenticate header from the 401 response. This works fine for the old "KeyVaultCredential" in package Microsoft.Azure.KeyVault, because the AuthenticationCallback callback provides "authority" parameters. But for the new Azure.Security.KeyVault package, there only exists scopes, tenantId in TokenRequestContext, which does not meet our requirements. So, could the TokenRequestContext export the _challenge.AuthorizationUri so that we could use it to get token.

Thanks!

Danieladu avatar Aug 06 '22 05:08 Danieladu

Thank you for your feedback. Tagging and routing to the team member best able to assist.

jsquire avatar Aug 06 '22 14:08 jsquire