Class IAuthTokenProviderExtensions
Extensions on the IAuthTokenProvider interface.
Inherited Members
Namespace: Microsoft.XboxStudios.SQTech.Authentication.PublicClientApp
Assembly: Microsoft.XboxStudios.SQTech.Authentication.PublicClientApp.dll
Syntax
public static class IAuthTokenProviderExtensions
Methods
View SourceCreateAuthorizationHeaderAsync(IAuthTokenProvider, IEnumerable<string>, string, CancellationToken)
Creates an authorization header for the requested scopes.
Declaration
public static Task<AuthenticationHeaderValue> CreateAuthorizationHeaderAsync(this IAuthTokenProvider tokenProvider, IEnumerable<string> applicationScopes, string scheme = "Bearer", CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IAuthTokenProvider | tokenProvider | The provider to extend. |
| IEnumerable<string> | applicationScopes | The target application scopes. |
| string | scheme | The scheme of the authentication header. Defaults to "Bearer". |
| CancellationToken | cancellationToken | A cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<AuthenticationHeaderValue> | A AuthenticationHeaderValue bearer that can be used as a properly formated authorization header in a Web API call. |