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
Returns
- TokenProvider.Key
A Key.
NormalizeAppliesTo(string)
Applies normalization into the token provider.
protected override string NormalizeAppliesTo(string appliesTo)
Parameters
appliesTo
stringThe 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
stringThe provider in which the token will be applied.
action
stringThe action.
timeout
TimeSpanThe duration.
callback
AsyncCallbackThe callback.
state
objectThe 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
stringThe provider in which the web token will be applied.
action
stringThe action.
timeout
TimeSpanThe duration.
callback
AsyncCallbackThe callback.
state
objectThe 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
IAsyncResultThe result of the operation.
cacheUntil
DateTimeThe 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
IAsyncResultThe result of the operation.
cacheUntil
DateTimeThe duration for the provider to store data.
Returns
- string
The retrieved token.