public TokenValidationParametersFactory(IOptions <AuthOptions> authOptions, IJwtSigningKeyResolver jwtSigningKeyProvider, IOptions <DevPermissionsOptions> devPermissionsOptions, IHostingEnvironment hostingEnvironment) { if (authOptions == null) { throw new ArgumentNullException(nameof(authOptions), $"{nameof(authOptions)} cannot be null"); } if (jwtSigningKeyProvider == null) { throw new ArgumentNullException(nameof(jwtSigningKeyProvider), $"{nameof(jwtSigningKeyProvider)} cannot be null"); } if (devPermissionsOptions == null) { throw new ArgumentNullException(nameof(devPermissionsOptions), $"{nameof(devPermissionsOptions)} cannot be null"); } if (hostingEnvironment == null) { throw new ArgumentNullException(nameof(hostingEnvironment), $"{nameof(hostingEnvironment)} cannot be null"); } _authOptions = authOptions.Value; _jwtSigningKeyProvider = jwtSigningKeyProvider; _devPermissionsOptions = devPermissionsOptions.Value; _hostingEnvironment = hostingEnvironment; }
public TokenValidationParametersFactory(IOptions <DelegationOptions> options, IJwtSigningKeyResolver jwtSigningKeyProvider, IHostingEnvironment hostingEnvironment) { if (options == null) { throw new ArgumentNullException(nameof(options), $"{nameof(options)} cannot be null"); } if (jwtSigningKeyProvider == null) { throw new ArgumentNullException(nameof(jwtSigningKeyProvider), $"{nameof(jwtSigningKeyProvider)} cannot be null"); } if (hostingEnvironment == null) { throw new ArgumentNullException(nameof(hostingEnvironment), $"{nameof(hostingEnvironment)} cannot be null"); } _options = options.Value; _jwtSigningKeyProvider = jwtSigningKeyProvider; _hostingEnvironment = hostingEnvironment; }