Table of Contents

Class SharedAccessSignatureTokenProvider

Namespace
Microsoft.Azure.ServiceBus.Primitives
Assembly
Microsoft.Azure.ServiceBus.dll

The SharedAccessSignatureTokenProvider generates tokens using a shared access key or existing signature.

public class SharedAccessSignatureTokenProvider : TokenProvider, ITokenProvider
Inheritance
SharedAccessSignatureTokenProvider
Implements
Inherited Members

Constructors

SharedAccessSignatureTokenProvider(string, string, Func<string, byte[]>, TimeSpan, TokenScope)

protected SharedAccessSignatureTokenProvider(string keyName, string sharedAccessKey, Func<string, byte[]> customKeyEncoder, TimeSpan tokenTimeToLive, TokenScope tokenScope)

Parameters

keyName string
sharedAccessKey string
customKeyEncoder Func<string, byte[]>
tokenTimeToLive TimeSpan
tokenScope TokenScope

Methods

BuildSignature(string)

protected virtual string BuildSignature(string targetUri)

Parameters

targetUri string

Returns

string

GetTokenAsync(string, TimeSpan)

Gets a SecurityToken for the given audience and duration.

public override Task<SecurityToken> GetTokenAsync(string appliesTo, TimeSpan timeout)

Parameters

appliesTo string

The URI which the access token applies to

timeout TimeSpan

The time span that specifies the timeout value for the message that gets the security token

Returns

Task<SecurityToken>

SecurityToken