/// <summary>
 ///   Inietta la dipendenze necessarie.
 /// </summary>
 /// <param name="authorizationSettings">Le impostazioni legate al server di OAuth2.</param>
 /// <param name="log">Istanza del log per questo filtro.</param>
 public BearerOAuth2AccessTokenExtractor(OAuth2AuthorizationSettings authorizationSettings, ILog log)
 {
     Raise.ArgumentNullException.IfIsNull(authorizationSettings, nameof(authorizationSettings));
     Raise.ArgumentNullException.IfIsNull(log, nameof(log));
     AuthorizationSettings = authorizationSettings;
     Log = log;
 }
 /// <summary>
 ///   Inietta la dipendenze necessarie.
 /// </summary>
 /// <param name="authorizationSettings">Le impostazioni legate al server di OAuth2.</param>
 /// <param name="log">Istanza del log per questo filtro.</param>
 /// <param name="clock">L'orologio di sistema.</param>
 public IdnSrvOAuth2AccessTokenRefresher(OAuth2AuthorizationSettings authorizationSettings, ICaravanLog log, IClock clock)
 {
     Raise.ArgumentNullException.IfIsNull(authorizationSettings, nameof(authorizationSettings));
     Raise.ArgumentNullException.IfIsNull(log, nameof(log));
     Raise.ArgumentNullException.IfIsNull(clock, nameof(clock));
     AuthorizationSettings = authorizationSettings;
     _log = log;
     _clock = clock;
 }
 /// <summary>
 ///   Inietta la dipendenze necessarie.
 /// </summary>
 /// <param name="authorizationSettings">Le impostazioni legate al server di OAuth2.</param>
 /// <param name="log">Istanza del log per questo filtro.</param>
 /// <param name="clock">L'orologio di sistema.</param>
 public IdnSrvOAuth2AuthorizationCodeHandler(OAuth2AuthorizationSettings authorizationSettings, ILog log, IClock clock)
 {
     Raise.ArgumentNullException.IfIsNull(authorizationSettings, nameof(authorizationSettings));
     Raise.ArgumentNullException.IfIsNull(log, nameof(log));
     Raise.ArgumentNullException.IfIsNull(clock, nameof(clock));
     AuthorizationSettings = authorizationSettings;
     Log = log;
     _clock = clock;
 }
        /// <summary>
        ///   Inietta la dipendenze necessarie.
        /// </summary>
        /// <param name="authorizationSettings">Le impostazioni legate al server di OAuth2.</param>
        /// <param name="log">Istanza del log per questo filtro.</param>
        /// <param name="mapper">Il mappatore di oggetti.</param>
        public IdnSrvOAuth2AccessTokenValidator(OAuth2AuthorizationSettings authorizationSettings, ILog log, IMapper mapper)
        {
            // Precondtions
            Raise.ArgumentNullException.IfIsNull(authorizationSettings, nameof(authorizationSettings));
            Raise.ArgumentNullException.IfIsNull(log, nameof(log));
            Raise.ArgumentNullException.IfIsNull(mapper, nameof(mapper));

            AuthorizationSettings = authorizationSettings;
            _log = log;
            _mapper = mapper;
        }
 /// <summary>
 ///   Inietta la dipendenze necessarie.
 /// </summary>
 /// <param name="authorizationSettings">Le impostazioni legate al server di OAuth2.</param>
 /// <param name="log">Istanza del log per questo filtro.</param>
 /// <param name="clock">L'orologio di sistema.</param>
 /// <param name="tokensCookieEncoder">
 ///   Il componente che decifra il cookie con i token di OAuth2.
 /// </param>
 /// <param name="csrfCookieEncoder">Il componente che decifra il cookie anti-CSRF.</param>
 /// <param name="accessTokenRefresher">
 ///   Il componente che si occupa di rinfrescare l'access token.
 /// </param>
 public CookiesOAuth2AccessTokenExtractor(OAuth2AuthorizationSettings authorizationSettings, ILog log, IClock clock, ICookieEncoder<OAuth2TokensCookie> tokensCookieEncoder, ICookieEncoder<OAuth2CsrfCookie> csrfCookieEncoder, IOAuth2AccessTokenRefresher accessTokenRefresher)
 {
     Raise.ArgumentNullException.IfIsNull(authorizationSettings, nameof(authorizationSettings));
     Raise.ArgumentNullException.IfIsNull(log, nameof(log));
     Raise.ArgumentNullException.IfIsNull(clock, nameof(clock));
     Raise.ArgumentNullException.IfIsNull(tokensCookieEncoder, nameof(tokensCookieEncoder));
     Raise.ArgumentNullException.IfIsNull(csrfCookieEncoder, nameof(csrfCookieEncoder));
     Raise.ArgumentNullException.IfIsNull(accessTokenRefresher, nameof(accessTokenRefresher));
     AuthorizationSettings = authorizationSettings;
     Log = log;
     _clock = clock;
     _tokensCookieEncoder = tokensCookieEncoder;
     _csrfCookieEncoder = csrfCookieEncoder;
     _accessTokenRefresher = accessTokenRefresher;
 }
Exemplo n.º 6
0
 /// <summary>
 ///   Istanzia l'autorizzatore.
 /// </summary>
 /// <param name="authorizationSettings">Le impostazioni legate al server di OAuth2.</param>
 public NoOpOAuth2UserValidator(OAuth2AuthorizationSettings authorizationSettings)
 {
     Raise.ArgumentNullException.IfIsNull(authorizationSettings, nameof(authorizationSettings));
     AuthorizationSettings = authorizationSettings;
 }