/// <summary> /// Initializes a new instance of the <see cref="AuthenticationService"/> class. /// </summary> /// <param name="oidcClient">The oidc client.</param> /// <param name="accountStorageService">The account storage service.</param> public AuthenticationService( OidcClient oidcClient, AccountStorageService accountStorageService) { _oidcClient = oidcClient; _accountStorageService = accountStorageService; }
/// <summary> /// Initializes a new instance of the <see cref="RefreshAndStoreTokenHandler"/> class. /// </summary> /// <param name="accountStorageService">The account storage service.</param> /// <param name="account">The account.</param> /// <param name="tokenEndpoint">The token endpoint.</param> /// <param name="clientId">The client identifier.</param> /// <param name="clientSecret">The client secret.</param> public RefreshAndStoreTokenHandler( AccountStorageService accountStorageService, Account account, string tokenEndpoint, string clientId, string clientSecret = null) : base(tokenEndpoint, clientId, clientSecret ?? string.Empty, account.RefreshToken, account.AccessToken, new HttpClientHandler()) { _accountStorageService = accountStorageService; TokenRefreshed += RefreshTokenDelegatingHandler_TokenRefreshed; }