Class TokenCredential
- Namespace
- Microsoft.WindowsAzure.Storage.Auth
- Assembly
- Microsoft.WindowsAzure.Storage.dll
Represents a token that is used to authorize HTTPS requests.
public sealed class TokenCredential : IDisposable
- Inheritance
-
TokenCredential
- Implements
- Inherited Members
Constructors
TokenCredential(string)
Create an instance of TokenCredential.
public TokenCredential(string initialToken)
Parameters
initialToken
stringInitial value of the token credential.
TokenCredential(string, RenewTokenFuncAsync, object, TimeSpan)
Create an instance of TokenCredential.
public TokenCredential(string initialToken, RenewTokenFuncAsync periodicTokenRenewer, object state, TimeSpan renewFrequency)
Parameters
initialToken
stringInitial value of the token credential.
periodicTokenRenewer
RenewTokenFuncAsyncIf given, this delegate is called periodically to renew the token credential.
state
objectA state object is passed to the periodicTokenRenewer every time it is called.
renewFrequency
TimeSpanIf periodicTokenRenewer is given, user should define a frequency to call the periodicTokenRenewer.
Properties
Token
The authorization token. It can be set by the user at any point in a thread-safe way.
public string Token { get; set; }
Property Value
Methods
Dispose()
Calling Dispose stops the timer and periodicTokenRenewer.
public void Dispose()