Show / Hide Table of Contents

Class IAuthTokenProviderExtensions

Extensions on the IAuthTokenProvider interface.

Inheritance
object
IAuthTokenProviderExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.XboxStudios.SQTech.Authentication.PublicClientApp
Assembly: Microsoft.XboxStudios.SQTech.Authentication.PublicClientApp.dll
Syntax
public static class IAuthTokenProviderExtensions

Methods

View Source

CreateAuthorizationHeaderAsync(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.

  • View Source
In This Article
Back to top Generated by DocFX