Class AzureActiveDirectoryTokenProvider
- Namespace
- Microsoft.ServiceBus
- Assembly
- Microsoft.ServiceBus.dll
Represents the Azure Active Directory token provider for the Service Bus and Event Hubs.
public class AzureActiveDirectoryTokenProvider : TokenProvider
- Inheritance
-
AzureActiveDirectoryTokenProvider
- Inherited Members
Methods
BuildKey(string, string)
Generates a key for the token provider.
protected override TokenProvider.Key BuildKey(string appliesTo, string action)
Parameters
Returns
- TokenProvider.Key
A generated key for the token provider.
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)
Parameters
appliesTo
stringThe URI which the access token applies to.
action
stringThe request action.
timeout
TimeSpanThe time span that specifies the timeout value for the message that gets the security token.
callback
AsyncCallbackAn AsyncCallback delegate that references the method to invoke when the operation is complete.
state
objectA user-defined object that contains state information about the asynchronous operation.
Returns
- IAsyncResult
An IAsyncResult object that references the asynchronous operation to get a token.
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)
Parameters
appliesTo
stringThe URI which the access token applies to.
action
stringThe request action.
timeout
TimeSpanThe time span that specifies the timeout value for the message that gets the security token.
callback
AsyncCallbackAn AsyncCallback delegate that references the method to invoke when the operation is complete.
state
objectA user-defined object that contains state information about the asynchronous operation.
Returns
- IAsyncResult
An IAsyncResult object that references the asynchronous operation to get a web token.
OnEndGetToken(IAsyncResult, out DateTime)
Executes upon calling the EndGetToken method.
protected override SecurityToken OnEndGetToken(IAsyncResult result, out DateTime cacheUntil)
Parameters
result
IAsyncResultAn IAsyncResult object that references the asynchronous operation to get a token.
cacheUntil
DateTimeWhen this method returns, contains the expiration date and time of the token information in the cache.
Returns
- SecurityToken
The System.IdentityModel.Tokens.SecurityToken object.
OnEndGetWebToken(IAsyncResult, out DateTime)
Executes upon calling the EndGetWebToken method.
protected override string OnEndGetWebToken(IAsyncResult result, out DateTime cacheUntil)
Parameters
result
IAsyncResultAn IAsyncResult object that references the asynchronous operation to get a web token.
cacheUntil
DateTimeWhen this method returns, contains the expiration date and time of the token information in the cache.