SharedAccessSignatureTokenProvider SharedAccessSignatureTokenProvider Class

Represents the shared access signature associated with the token provider.

Syntax

Declaration

public class SharedAccessSignatureTokenProvider : TokenProviderPublic Class SharedAccessSignatureTokenProvider
    Inherits TokenProvider

Inheritance Hierarchy

Inherited Members

Microsoft.ServiceBus.TokenProvider

, , , ,
Clear()
Clear()
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

System.Object

, , , , , ,

Constructors summary

Fields summary

The epoch time.

Properties summary

Gets whether the token provider strips query parameters.

Methods summary

Generates a key for the token provider.

Returns the shared access signature associated with the specified key name, SAS key, resource, and token time-to-live.

Executes upon calling the BeginGetToken method.

Executes upon calling the BeginGetWebToken method.

Executes upon calling the EndGetToken method.

Executes upon calling the EndGetWebToken method.

Constructors

  • SharedAccessSignatureTokenProvider(String, String, Func<String, Byte[]>, TimeSpan, TokenScope)
    SharedAccessSignatureTokenProvider(String, String, Func(Of String, Byte()), TimeSpan, TokenScope)
    protected SharedAccessSignatureTokenProvider(string keyName, string sharedAccessKey, Func<string, byte[]> customKeyEncoder, TimeSpan tokenTimeToLive, TokenScope tokenScope)Protected Sub New(keyName As String, sharedAccessKey As String, customKeyEncoder As Func(Of String, Byte()), tokenTimeToLive As TimeSpan, tokenScope As TokenScope)

    Parameters

Fields

  • EpochTime
    EpochTime

    The epoch time.

    public static readonly DateTime EpochTimePublic Shared ReadOnly EpochTime As Date

Properties

Methods

  • BuildKey(String, String)
    BuildKey(String, String)

    Generates a key for the token provider.

    protected override TokenProvider.Key BuildKey(string appliesTo, string action)Protected Overrides Function BuildKey(appliesTo As String, action As String) As TokenProvider.Key

    Parameters

    Returns

    Overrides

  • BuildSignature(String)
    BuildSignature(String)
    protected virtual string BuildSignature(string targetUri)Protected Overridable Function BuildSignature(targetUri As String) As String

    Parameters

    Returns

  • GetPublisherSharedAccessSignature(Uri, String, String, String, String, TimeSpan)
    GetPublisherSharedAccessSignature(Uri, String, String, String, String, TimeSpan)
    public static string GetPublisherSharedAccessSignature(Uri endpoint, string entityPath, string publisher, string keyName, string key, TimeSpan tokenTimeToLive)Public Shared Function GetPublisherSharedAccessSignature(endpoint As Uri, entityPath As String, publisher As String, keyName As String, key As String, tokenTimeToLive As TimeSpan) As String

    Parameters

    Returns

    Remarks

    This method assumes UTF8 encoding is being used.

  • GetSharedAccessSignature(String, String, String, TimeSpan)
    GetSharedAccessSignature(String, String, String, TimeSpan)

    Returns the shared access signature associated with the specified key name, SAS key, resource, and token time-to-live.

    public static string GetSharedAccessSignature(string keyName, string sharedAccessKey, string resource, TimeSpan tokenTimeToLive)Public Shared Function GetSharedAccessSignature(keyName As String, sharedAccessKey As String, resource As String, tokenTimeToLive As TimeSpan) As String

    Parameters

    Returns

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

    Executes upon calling the BeginGetToken method.

    protected override IAsyncResult OnBeginGetToken(string appliesTo, string action, TimeSpan timeout, AsyncCallback callback, object state)Protected Overrides Function OnBeginGetToken(appliesTo As String, action As String, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    • appliesTo

      The URI which the access token applies to.

    • action

      The request action.

    • timeout

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

    • callback

      An AsyncCallback delegate that references the method to invoke when the operation is complete.

    • state

      A user-defined object that contains state information about the asynchronous operation.

    Returns

    Overrides

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

    Executes upon calling the BeginGetWebToken method.

    protected override IAsyncResult OnBeginGetWebToken(string appliesTo, string action, TimeSpan timeout, AsyncCallback callback, object state)Protected Overrides Function OnBeginGetWebToken(appliesTo As String, action As String, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    • appliesTo

      The URI which the access token applies to.

    • action

      The request action.

    • timeout

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

    • callback

      An AsyncCallback delegate that references the method to invoke when the operation is complete.

    • state

      A user-defined object that contains state information about the asynchronous operation.

    Returns

    Overrides

  • OnEndGetToken(IAsyncResult, out DateTime)
    OnEndGetToken(IAsyncResult, ByRef DateTime)

    Executes upon calling the EndGetToken method.

    protected override SecurityToken OnEndGetToken(IAsyncResult result, out DateTime cacheUntil)Protected Overrides Function OnEndGetToken(result As IAsyncResult, ByRef cacheUntil As Date) As SecurityToken

    Parameters

    • result

      An IAsyncResult object that references the asynchronous operation to get a token.

    • cacheUntil

      When this method returns, contains the expiration date and time of the token information in the cache.

    Returns

    Overrides

  • OnEndGetWebToken(IAsyncResult, out DateTime)
    OnEndGetWebToken(IAsyncResult, ByRef DateTime)

    Executes upon calling the EndGetWebToken method.

    protected override string OnEndGetWebToken(IAsyncResult result, out DateTime cacheUntil)Protected Overrides Function OnEndGetWebToken(result As IAsyncResult, ByRef cacheUntil As Date) As String

    Parameters

    • result

      An IAsyncResult object that references the asynchronous operation to get a web token.

    • cacheUntil

      When this method returns, contains the expiration date and time of the token information in the cache.

    Returns

    Overrides

Details

Namespace

Microsoft.ServiceBus

Assembly

Microsoft.ServiceBus.dll