Table of Contents

Class OAuthTokenProvider

Namespace
Microsoft.ServiceBus
Assembly
Microsoft.ServiceBus.dll

Provides authentication token for the service bus.

public class OAuthTokenProvider : TokenProvider
Inheritance
OAuthTokenProvider
Inherited Members

Methods

BuildKey(string, string)

Builds a key for the provider.

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

Parameters

appliesTo string

The provider in which the key will be applied.

action string

The action.

Returns

TokenProvider.Key

A Key.

NormalizeAppliesTo(string)

Applies normalization into the token provider.

protected override string NormalizeAppliesTo(string appliesTo)

Parameters

appliesTo string

The token provider where the normalization will be applied.

Returns

string

The normalized token provider.

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

Retrieves a token when the provider begins.

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

Parameters

appliesTo string

The provider in which the token will be applied.

action string

The action.

timeout TimeSpan

The duration.

callback AsyncCallback

The callback.

state object

The state of the operation.

Returns

IAsyncResult

The asynchronous result of the operation.

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

Retrieves a web token when the provider begins.

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

Parameters

appliesTo string

The provider in which the web token will be applied.

action string

The action.

timeout TimeSpan

The duration.

callback AsyncCallback

The callback.

state object

The state of the operation.

Returns

IAsyncResult

The asynchronous result of the operation.

OnEndGetToken(IAsyncResult, out DateTime)

Retrieves a token when the provider ends.

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

Parameters

result IAsyncResult

The result of the operation.

cacheUntil DateTime

The duration for the provider to store data.

Returns

SecurityToken

The retrieved token.

OnEndGetWebToken(IAsyncResult, out DateTime)

Retrieves a web token when the provider ends.

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

Parameters

result IAsyncResult

The result of the operation.

cacheUntil DateTime

The duration for the provider to store data.

Returns

string

The retrieved token.