IAuthorizationHeaderProvider2 Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Extends IAuthorizationHeaderProvider with metadata-carrying counterparts of its three header-creation methods. Each returns the full AuthorizationHeaderInformation (header value, binding certificate, and token-acquisition metadata) as an OperationResult<TResult,TError> instead of a bare header string.
public interface IAuthorizationHeaderProvider2 : Microsoft.Identity.Abstractions.IAuthorizationHeaderProvider
type IAuthorizationHeaderProvider2 = interface
interface IAuthorizationHeaderProvider
Public Interface IAuthorizationHeaderProvider2
Implements IAuthorizationHeaderProvider
- Derived
- Implements
Remarks
Follows the additive numeric-suffix interface-evolution convention: the new interface extends the existing one so a single implementation can serve both, and existing string-returning callers are unaffected. The user, application, and unified entry points mirror the inputs of CreateAuthorizationHeaderForUserAsync(IEnumerable<String>, AuthorizationHeaderProviderOptions, ClaimsPrincipal, CancellationToken), CreateAuthorizationHeaderForAppAsync(String, AuthorizationHeaderProviderOptions, CancellationToken), and CreateAuthorizationHeaderAsync(IEnumerable<String>, AuthorizationHeaderProviderOptions, ClaimsPrincipal, CancellationToken) respectively; when the selected protocol is bound (for example mTLS Proof-of-Possession) the binding certificate is populated on the returned BindingCertificate.
Methods
| Name | Description |
|---|---|
| CreateAuthorizationHeaderAsync(IEnumerable<String>, AuthorizationHeaderProviderOptions, ClaimsPrincipal, CancellationToken) |
Creates an authorization header for calling a protected web API on behalf of a user or the application. (Inherited from IAuthorizationHeaderProvider) |
| CreateAuthorizationHeaderForAppAsync(String, AuthorizationHeaderProviderOptions, CancellationToken) |
Creates the authorization header used to call a protected web API on behalf of the application itself. (Inherited from IAuthorizationHeaderProvider) |
| CreateAuthorizationHeaderForUserAsync(IEnumerable<String>, AuthorizationHeaderProviderOptions, ClaimsPrincipal, CancellationToken) |
Creates the authorization header used to call a protected web API on behalf of a user. (Inherited from IAuthorizationHeaderProvider) |
| CreateAuthorizationHeaderInformationAsync(IEnumerable<String>, AuthorizationHeaderProviderOptions, ClaimsPrincipal, CancellationToken) |
Rich-result counterpart of CreateAuthorizationHeaderAsync(IEnumerable<String>, AuthorizationHeaderProviderOptions, ClaimsPrincipal, CancellationToken): creates an authorization header for calling a protected web API on behalf of a user or the application and returns the full AuthorizationHeaderInformation on success, with metadata and (when the protocol is bound) the binding certificate populated. On failure the AuthorizationHeaderError carries the token-acquisition metadata and structured failure details when available. |
| CreateAuthorizationHeaderInformationForAppAsync(String, AuthorizationHeaderProviderOptions, CancellationToken) |
Rich-result counterpart of CreateAuthorizationHeaderForAppAsync(String, AuthorizationHeaderProviderOptions, CancellationToken): creates the authorization header used to call a protected web API on behalf of the application itself and returns the full AuthorizationHeaderInformation on success, with metadata and (when the protocol is bound) the binding certificate populated. On failure the AuthorizationHeaderError carries the token-acquisition metadata and structured failure details when available. |
| CreateAuthorizationHeaderInformationForUserAsync(IEnumerable<String>, AuthorizationHeaderProviderOptions, ClaimsPrincipal, CancellationToken) |
Rich-result counterpart of CreateAuthorizationHeaderForUserAsync(IEnumerable<String>, AuthorizationHeaderProviderOptions, ClaimsPrincipal, CancellationToken): creates the authorization header used to call a protected web API on behalf of a user and returns the full AuthorizationHeaderInformation on success, with metadata and (when the protocol is bound) the binding certificate populated. On failure the AuthorizationHeaderError carries the token-acquisition metadata and structured failure details when available. |