コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="JwtTokenAuthorizationFilter"/> class.
        /// </summary>
        /// <param name="authorizationOptions">The options for configuring how to authorize requests.</param>
        /// <exception cref="ArgumentNullException">Thrown when the <paramref name="authorizationOptions"/> is <c>null</c>.</exception>
        public JwtTokenAuthorizationFilter(JwtTokenAuthorizationOptions authorizationOptions)
        {
            Guard.NotNull(authorizationOptions, nameof(authorizationOptions),
                          "Requires a set of options to configure how the JWT authorization filter should authorize requests");

            _authorizationOptions = authorizationOptions;
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="JwtTokenAuthorizationFilter"/> class.
        /// </summary>
        /// <param name="authorizationOptions">Options for configuring how to authorize requests</param>
        public JwtTokenAuthorizationFilter(JwtTokenAuthorizationOptions authorizationOptions)
        {
            Guard.NotNull(authorizationOptions, nameof(authorizationOptions));

            _authorizationOptions = authorizationOptions;
        }