TokenProvider.createSharedAccessSignatureTokenProvider 方法

定义

重载

createSharedAccessSignatureTokenProvider(String sasKeyName, String sasKey)

Creates a Shared Access Signature token provider with the given key name and key value. Returned token provider creates tokens with validity of 20 minutes. This is a utility method.

createSharedAccessSignatureTokenProvider(String sasToken, Instant sasTokenValidUntil)

Creates a Shared Access Signature token provider that always returns an already created token. This is a utility method.

createSharedAccessSignatureTokenProvider(String sasKeyName, String sasKey)

Creates a Shared Access Signature token provider with the given key name and key value. Returned token provider creates tokens with validity of 20 minutes. This is a utility method.

public static TokenProvider createSharedAccessSignatureTokenProvider(String sasKeyName, String sasKey)

参数

sasKeyName
String

SAS key name

sasKey
String

SAS key value

返回

an instance of Shared Access Signature token provider with the given key name, key value.

createSharedAccessSignatureTokenProvider(String sasToken, Instant sasTokenValidUntil)

Creates a Shared Access Signature token provider that always returns an already created token. This is a utility method.

public static TokenProvider createSharedAccessSignatureTokenProvider(String sasToken, Instant sasTokenValidUntil)

参数

sasToken
String

Already created Shared Access Signature token to be returned by getSecurityTokenAsync(String audience) method.

sasTokenValidUntil
Instant

Instant when the token expires

返回

an instance of Shared Access Signature token provider that always returns an already created token.

适用于