Delen via


TokenProvider Class

Definition

Represents a security token provider with built-in factory methods returning some well-known token providers.

public abstract class TokenProvider
type TokenProvider = class
Public MustInherit Class TokenProvider
Inheritance
TokenProvider
Derived

Constructors

TokenProvider(Boolean, Boolean, Int32, TokenScope)

Initializes a new instance of the TokenProvider class.

TokenProvider(Boolean, Boolean, TokenScope)

Initializes a new instance of the TokenProvider class.

TokenProvider(Boolean, Boolean)

Initializes a new instance of the TokenProvider class.

Properties

CacheSize

Gets or sets the size of the cache.

CacheTokens

Gets or sets a value that indicates whether new security tokens are being cached.

IsWebTokenSupported

Gets or sets a value that indicates whether web token is supported by this provider.

StripQueryParameters

Gets whether the token provider strips query parameters.

TokenScope

Gets or sets the token scope associated with the provider.

Methods

BeginGetToken(String, String, Boolean, TimeSpan, AsyncCallback, Object)

Begins an asynchronous operation to get a security token.

BeginGetWebToken(String, String, Boolean, TimeSpan, AsyncCallback, Object)

Begins an asynchronous operation to get a web token.

BuildKey(String, String)

Generates a key for the token provider.

Clear()

Clears the token provider.

CreateAzureActiveDirectoryTokenProvider(AzureActiveDirectoryTokenProvider+AuthenticationCallback, Uri, String, Object)

Creates an Azure Active Directory token provider.

CreateManagedIdentityTokenProvider(AzureServiceTokenProvider, Uri)

Creates a TokenProvider using a default AzureServiceTokenProvider instance. This overload will allow authentication with both managed and user-assigned identities for Azure resources. For more details on AzureServiceTokenProvider, please see http://docs.microsoft.com/en-us/dotnet/api/overview/azure/service-to-service-authentication#connection-string-support.

CreateManagedIdentityTokenProvider(Uri)

Creates a TokenProvider using a default AzureServiceTokenProvider instance. This overload will authenticate with managed identities for Azure resources. For more details on AzureServiceTokenProvider, please see http://docs.microsoft.com/en-us/dotnet/api/overview/azure/service-to-service-authentication#connection-string-support.

CreateOAuthTokenProvider(IEnumerable<Uri>, NetworkCredential)

Creates an OAuth (open standard for authorization) token provider.

CreateSamlTokenProvider(String, TokenScope)

Creates a SAML token provider with the specified SAML token and scope.

CreateSamlTokenProvider(String, Uri, Int32, TokenScope)

Creates a SAML token provider with the specified SAML token, URI of the Security Token Service (STS), cache size and token scope.

CreateSamlTokenProvider(String, Uri, Int32)

Creates a SAML token provider with the specified SAML token, URI of the Security Token Service (STS) and cache size.

CreateSamlTokenProvider(String, Uri, TokenScope)

Creates a SAML token provider with the specified SAML token, URI of the Security Token Service (STS) and token scope.

CreateSamlTokenProvider(String, Uri)

Creates a SAML token provider with the specified SAML token and URI of the Security Token Service (STS).

CreateSamlTokenProvider(String)

Creates a SAML token provider with the specified SAML token.

CreateSharedAccessSignatureTokenProvider(String, String, TimeSpan, TokenScope)

Creates a URL that grants access to the token provider.

CreateSharedAccessSignatureTokenProvider(String, String, TimeSpan)

Creates a URL that grants access to the token provider with the specified key name, shared access key and token time to live.

CreateSharedAccessSignatureTokenProvider(String, String, TokenScope)

Creates a URL that grants access to the token provider with the specified key name, shared access key and token scope.

CreateSharedAccessSignatureTokenProvider(String, String)

Creates a URL that grants access to the token provider with the specified key name and shared access key.

CreateSharedAccessSignatureTokenProvider(String)

Creates a URL that grants access to the token provider with the specified shared access signature.

CreateSharedSecretTokenProvider(String, Byte[], TokenScope)

Creates a shared secret token provider.

CreateSharedSecretTokenProvider(String, Byte[], Uri, TokenScope)

Creates a shared secret token provider.

CreateSharedSecretTokenProvider(String, Byte[], Uri)

Creates a shared secret token provider.

CreateSharedSecretTokenProvider(String, Byte[])

Creates a shared secret token provider.

CreateSharedSecretTokenProvider(String, String, TokenScope)

Creates a shared secret token provider.

CreateSharedSecretTokenProvider(String, String, Uri, TokenScope)

Creates a shared secret token provider.

CreateSharedSecretTokenProvider(String, String, Uri)

Creates a shared secret token provider.

CreateSharedSecretTokenProvider(String, String)

Creates a shared secret token provider.

CreateSimpleWebTokenProvider(String, TokenScope)

Creates a simple web token provider.

CreateSimpleWebTokenProvider(String, Uri, TokenScope)

Creates a simple web token provider.

CreateSimpleWebTokenProvider(String, Uri)

Creates a simple web token provider.

CreateSimpleWebTokenProvider(String)

Creates a simple web token provider.

CreateWindowsTokenProvider(IEnumerable<Uri>, NetworkCredential)

Creates a windows token provider.

CreateWindowsTokenProvider(IEnumerable<Uri>)

Creates a windows token provider.

EndGetToken(IAsyncResult)

Completes an asynchronous operation to get a security token.

EndGetWebToken(IAsyncResult)

Completes an asynchronous operation to get a web token.

GetTokenAsync(String, String, Boolean, TimeSpan)

Asynchronously retrieves the token for the provider.

GetWebTokenAsync(String, String, Boolean, TimeSpan)

Asynchronously retrieves the web token for the provider.

NormalizeAppliesTo(String)

Returns an object whose value is the same as the token provider.

OnBeginGetToken(String, String, TimeSpan, AsyncCallback, Object)

Executes upon calling the BeginGetToken method.

OnBeginGetWebToken(String, String, TimeSpan, AsyncCallback, Object)

Executes upon calling the BeginGetWebToken method.

OnEndGetToken(IAsyncResult, DateTime)

Executes upon calling the EndGetToken method.

OnEndGetWebToken(IAsyncResult, DateTime)

Executes upon calling the EndGetWebToken method.

Applies to