예제 #1
0
        private async Task RefreshAccessToken(bool allowCachedToken = true)
        {
            var token = string.Empty;

            if (allowCachedToken)
            {
                token = _authorizationHandler.RetrieveLocalAccessToken();
            }

            if (string.IsNullOrEmpty(token))
            {
                token = await _authorizationHandler.RetrieveRemoteAccessTokenAsync();
            }

            _httpHandler.UseBearerToken(token);
        }