C# Class Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication.AdalTokenProvider

A token provider that uses ADAL to retrieve tokens from Azure Active Directory
Inheritance: ITokenProvider
Show file Open project: AzureRT/azure-sdk-tools Class Usage Examples

Public Methods

Method Description
AdalTokenProvider ( ) : System
AdalTokenProvider ( IWin32Window parentWindow, string>.IDictionary tokenCache ) : System
GetCachedToken ( WindowsAzureSubscription subscription, string userId ) : IAccessToken
GetNewToken ( WindowsAzureEnvironment environment ) : IAccessToken
GetNewToken ( WindowsAzureSubscription subscription, string userId ) : IAccessToken

Private Methods

Method Description
AcquireToken ( AdalConfiguration config, string userId = null ) : AuthenticationResult
ClearCookies ( ) : void
CreateContext ( AdalConfiguration config ) : AuthenticationContext
DecodeCachedAuthResult ( TokenCacheKey key ) : AuthenticationResult

Decode cache contents into something we can feed to AuthenticationResult.Deserialize. WARNING: This will be deprecated eventually by ADAL team and replaced by something supported.

GetExceptionMessage ( Exception ex ) : string
GetRefreshToken ( AdalAccessToken token ) : string
IsExpired ( AdalAccessToken token ) : bool
Renew ( AdalAccessToken token ) : void

Method Details

AdalTokenProvider() public method

public AdalTokenProvider ( ) : System
return System

AdalTokenProvider() public method

public AdalTokenProvider ( IWin32Window parentWindow, string>.IDictionary tokenCache ) : System
parentWindow IWin32Window
tokenCache string>.IDictionary
return System

GetCachedToken() public method

public GetCachedToken ( WindowsAzureSubscription subscription, string userId ) : IAccessToken
subscription WindowsAzureSubscription
userId string
return IAccessToken

GetNewToken() public method

public GetNewToken ( WindowsAzureEnvironment environment ) : IAccessToken
environment WindowsAzureEnvironment
return IAccessToken

GetNewToken() public method

public GetNewToken ( WindowsAzureSubscription subscription, string userId ) : IAccessToken
subscription WindowsAzureSubscription
userId string
return IAccessToken