Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication.AdalTokenProvider.DecodeCachedAuthResult C# (CSharp) Method

DecodeCachedAuthResult() private method

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.
private DecodeCachedAuthResult ( TokenCacheKey key ) : AuthenticationResult
key TokenCacheKey The cache key for the entry to decode
return AuthenticationResult
        private AuthenticationResult DecodeCachedAuthResult(TokenCacheKey key)
        {
            string encoded = tokenCache[key];
            string decoded = Encoding.UTF8.GetString(Convert.FromBase64String(encoded));
            return AuthenticationResult.Deserialize(decoded);
        }