示例#1
0
        private async Task SetAuthentication(string token, string refreshToken)
        {
            await _currentUser.SetAuthToken(token);

            await _currentUser.SetAuthRefreshToken(refreshToken);

            ((CustomAuthenticationStateProvider)authenticationStateProvider).MarkUserAsAuthenticated(token);

            httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("bearer", token);
        }