public AuthenticationTicketProvider(ITokenHttpClient tokenHttpClient, IDateTimeOffsetProvider dateTimeOffsetProvider) { this.tokenHttpClient = tokenHttpClient; this.dateTimeOffsetProvider = dateTimeOffsetProvider; this.semaphore = new SemaphoreSlim(1); }
public AuthenticationTicketProvider( IAuthenticationManager authenticationManager, IDateTimeOffsetProvider dateTimeOffsetProvider, ITokenHttpClient tokenHttpClient, IOptionsProvider <AspNetCoreAuthorizationCodeFlowOptions> optionsProvider) { this.authenticationManager = authenticationManager; this.dateTimeOffsetProvider = dateTimeOffsetProvider; this.tokenHttpClient = tokenHttpClient; this.optionsProvider = optionsProvider; }
/// <summary> /// Gets the access token or throw invalid refresh token exception. /// </summary> /// <param name="tokenHttpClient">The token HTTP client.</param> /// <param name="refreshToken">The refresh token.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns></returns> public static async Task <AccessTokenDto> GetAccessTokenOrThrowInvalidRefreshTokenExceptionAsync( this ITokenHttpClient tokenHttpClient, string refreshToken, CancellationToken cancellationToken) { try { return(await tokenHttpClient.GetAccessTokenFromRefreshTokenAsync( refreshToken, cancellationToken).ConfigureAwait(false)); } catch (SpotifyHttpResponseWithAuthenticationErrorException e) when( e.ErrorCode == System.Net.HttpStatusCode.BadRequest && "invalid_grant".Equals(e.Payload?.Error, StringComparison.OrdinalIgnoreCase)) { throw new SpotifyInvalidRefreshTokenException(e); } }
public TokenService(IJSRuntime jsRuntimeCurrent, ITokenHttpClient httpClient) { this.JsRuntimeCurrent = jsRuntimeCurrent; this.HttpClient = httpClient; }
public NaiveTokenProxyClient(ITokenHttpClient tokenHttpClient, IAuthorizationCallbackUriProvider authorizationCallbackUriProvider) { this.tokenHttpClient = tokenHttpClient; this.authorizationCallbackUriProvider = authorizationCallbackUriProvider; }
public OfficeService(ITokenHttpClient httpClient) { this.HttpClient = httpClient; }
public CakeMarkService(ITokenHttpClient httpClient) { this.HttpClient = httpClient; }
public UserService(ITokenHttpClient httpClient) { this.HttpClient = httpClient; }