Condividi tramite


UserTokenProvider.CreateCredentialsFromCache Method

Definition

Overloads

CreateCredentialsFromCache(String, String, String)

Create service client credentials using information cached from a previous login to azure resource manager using the default token cache. Parameters are used to match existing tokens.

CreateCredentialsFromCache(String, String, String, TokenCache)

Create service client credentials using information cached from a previous login to azure resource manager. Parameters are used to match existing tokens.

CreateCredentialsFromCache(String, String, String, ActiveDirectoryServiceSettings)

Create service client credentials using information cached from a previous login in the default token cache. Parameters are used to match existing tokens.

CreateCredentialsFromCache(String, String, String, ActiveDirectoryServiceSettings, TokenCache)

Create service client credentials using information cached from a previous login. Parameters are used to match existing tokens.

CreateCredentialsFromCache(String, String, String)

Create service client credentials using information cached from a previous login to azure resource manager using the default token cache. Parameters are used to match existing tokens.

public static System.Threading.Tasks.Task<Microsoft.Rest.ServiceClientCredentials> CreateCredentialsFromCache (string clientId, string domain, string username);
static member CreateCredentialsFromCache : string * string * string -> System.Threading.Tasks.Task<Microsoft.Rest.ServiceClientCredentials>
Public Shared Function CreateCredentialsFromCache (clientId As String, domain As String, username As String) As Task(Of ServiceClientCredentials)

Parameters

clientId
String

The clientId to match when retrieving authentication tokens.

domain
String

The active directory domain or tenant id to match when retrieving authentication tokens.

username
String

The account username to match when retrieving authentication tokens.

Returns

A ServiceClientCredentials object that can be used to authenticate http requests using the retrieved credentials. If no credentials can be retrieved, an authentication exception is thrown.

Applies to

CreateCredentialsFromCache(String, String, String, TokenCache)

Create service client credentials using information cached from a previous login to azure resource manager. Parameters are used to match existing tokens.

public static System.Threading.Tasks.Task<Microsoft.Rest.ServiceClientCredentials> CreateCredentialsFromCache (string clientId, string domain, string username, Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache cache);
static member CreateCredentialsFromCache : string * string * string * Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache -> System.Threading.Tasks.Task<Microsoft.Rest.ServiceClientCredentials>
Public Shared Function CreateCredentialsFromCache (clientId As String, domain As String, username As String, cache As TokenCache) As Task(Of ServiceClientCredentials)

Parameters

clientId
String

The clientId to match when retrieving authentication tokens.

domain
String

The active directory domain or tenant id to match when retrieving authentication tokens.

username
String

The account username to match when retrieving authentication tokens.

cache
Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache

The token cache to target when retrieving tokens.

Returns

A ServiceClientCredentials object that can be used to authenticate http requests using the retrieved credentials. If no credentials can be retrieved, an authentication exception is thrown.

Applies to

CreateCredentialsFromCache(String, String, String, ActiveDirectoryServiceSettings)

Create service client credentials using information cached from a previous login in the default token cache. Parameters are used to match existing tokens.

public static System.Threading.Tasks.Task<Microsoft.Rest.ServiceClientCredentials> CreateCredentialsFromCache (string clientId, string domain, string username, Microsoft.Rest.Azure.Authentication.ActiveDirectoryServiceSettings serviceSettings);
static member CreateCredentialsFromCache : string * string * string * Microsoft.Rest.Azure.Authentication.ActiveDirectoryServiceSettings -> System.Threading.Tasks.Task<Microsoft.Rest.ServiceClientCredentials>
Public Shared Function CreateCredentialsFromCache (clientId As String, domain As String, username As String, serviceSettings As ActiveDirectoryServiceSettings) As Task(Of ServiceClientCredentials)

Parameters

clientId
String

The clientId to match when retrieving authentication tokens.

domain
String

The active directory domain or tenant id to match when retrieving authentication tokens.

username
String

The account username to match when retrieving authentication tokens.

serviceSettings
ActiveDirectoryServiceSettings

The active directory service settings, including token authority and audience to match when retrieving tokens.

Returns

A ServiceClientCredentials object that can be used to authenticate http requests using the retrieved credentials. If no credentials can be retrieved, an authentication exception is thrown.

Applies to

CreateCredentialsFromCache(String, String, String, ActiveDirectoryServiceSettings, TokenCache)

Create service client credentials using information cached from a previous login. Parameters are used to match existing tokens.

public static System.Threading.Tasks.Task<Microsoft.Rest.ServiceClientCredentials> CreateCredentialsFromCache (string clientId, string domain, string username, Microsoft.Rest.Azure.Authentication.ActiveDirectoryServiceSettings serviceSettings, Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache cache);
static member CreateCredentialsFromCache : string * string * string * Microsoft.Rest.Azure.Authentication.ActiveDirectoryServiceSettings * Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache -> System.Threading.Tasks.Task<Microsoft.Rest.ServiceClientCredentials>
Public Shared Function CreateCredentialsFromCache (clientId As String, domain As String, username As String, serviceSettings As ActiveDirectoryServiceSettings, cache As TokenCache) As Task(Of ServiceClientCredentials)

Parameters

clientId
String

The clientId to match when retrieving authentication tokens.

domain
String

The active directory domain or tenant id to match when retrieving authentication tokens.

username
String

The account username to match when retrieving authentication tokens.

serviceSettings
ActiveDirectoryServiceSettings

The active directory service settings, including token authority and audience to match when retrieving tokens.

cache
Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache

The token cache to target when retrieving tokens.

Returns

A ServiceClientCredentials object that can be used to authenticate http requests using the retrieved credentials. If no credentials can be retrieved, an authentication exception is thrown.

Applies to