Table of Contents

Class WindowsTokenProvider

Namespace
Microsoft.ServiceBus
Assembly
Microsoft.ServiceBus.dll

Represents the token provider for the service bus.

public class WindowsTokenProvider : TokenProvider
Inheritance
WindowsTokenProvider
Inherited Members

Methods

BuildKey(string, string)

Generates a key for the token provider.

protected override TokenProvider.Key BuildKey(string appliesTo, string action)

Parameters

appliesTo string

The URI which the access token applies to.

action string

The request action.

Returns

TokenProvider.Key

A generated key.

NormalizeAppliesTo(string)

Returns the normalize URI form of the target address.

protected override string NormalizeAppliesTo(string appliesTo)

Parameters

appliesTo string

The URI which the normalization applies to.

Returns

string

The normalize URI form for the target address.

OnBeginGetToken(string, string, TimeSpan, AsyncCallback, object)

Retrieves a token when the provider service was started.

protected override IAsyncResult OnBeginGetToken(string appliesTo, string action, TimeSpan timeout, AsyncCallback callback, object state)

Parameters

appliesTo string

The object where the token will be applied.

action string

The action.

timeout TimeSpan

The duration of the operation.

callback AsyncCallback

The argument fir the provider.

state object

The state of the provider.

Returns

IAsyncResult

The result of the operation.

OnBeginGetWebToken(string, string, TimeSpan, AsyncCallback, object)

Retrieves a web token when the provider service was started.

protected override IAsyncResult OnBeginGetWebToken(string appliesTo, string action, TimeSpan timeout, AsyncCallback callback, object state)

Parameters

appliesTo string

The object where the token will be applied.

action string

The action.

timeout TimeSpan

The duration of the operation.

callback AsyncCallback

The argument fir the provider.

state object

The state of the provider.

Returns

IAsyncResult

The result of the operation.

OnEndGetToken(IAsyncResult, out DateTime)

Retrieves a token when the provider service was stopped.

protected override SecurityToken OnEndGetToken(IAsyncResult result, out DateTime cacheUntil)

Parameters

result IAsyncResult

The result of the operation.

cacheUntil DateTime

The specified duration of time for the provider to store data.

Returns

SecurityToken

The retrieved token.

OnEndGetWebToken(IAsyncResult, out DateTime)

Retrieves a web token when the provider service was stopped.

protected override string OnEndGetWebToken(IAsyncResult result, out DateTime cacheUntil)

Parameters

result IAsyncResult

The result of the operation.

cacheUntil DateTime

The specified duration of time for the provider to store data.

Returns

string

The retrieved web token.