public CustomOidcConfigController(IDiscoveryResponseGenerator responseGenerator, IdentityServerOptions options, IConfiguration config, ILogger <CustomOidcConfigController> logger)
 {
     _responseGenerator = responseGenerator;
     _options           = options;
     _logger            = logger;
     _config            = config;
 }
Ejemplo n.º 2
0
 public DiscoveryEndpoint(
     ILogger <DiscoveryEndpoint> logger,
     IdentityServerOptions options,
     IDiscoveryResponseGenerator responseGenerator)
 {
     _logger            = logger;
     _options           = options;
     _responseGenerator = responseGenerator;
 }
Ejemplo n.º 3
0
 public AnonymousDiscoveryResponseGenerator(
     Decorator <IDiscoveryResponseGenerator> decorator,
     IdentityServerOptions options,
     AnonymousIdentityServerOptions anonIdsrvOptions)
 {
     _inner            = decorator.Instance;
     _options          = options;
     _anonIdsrvOptions = anonIdsrvOptions;
 }
Ejemplo n.º 4
0
 public DiscoveryKeyEndpoint(
     IdentityServerOptions options,
     IDiscoveryResponseGenerator responseGenerator,
     ILogger <DiscoveryKeyEndpoint> logger)
 {
     _logger            = logger ?? throw new ArgumentNullException(nameof(logger));
     _options           = options ?? throw new ArgumentNullException(nameof(options));
     _responseGenerator = responseGenerator ?? throw new ArgumentNullException(nameof(responseGenerator));
 }
Ejemplo n.º 5
0
 public DiscoveryEndpoint(
     IdentityServerOptions options,
     IIssuerNameService issuerNameService,
     IDiscoveryResponseGenerator responseGenerator,
     ILogger <DiscoveryEndpoint> logger)
 {
     _logger            = logger;
     _options           = options;
     _issuerNameService = issuerNameService;
     _responseGenerator = responseGenerator;
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RegisterClientService" /> class.
        /// </summary>
        /// <param name="clientStore">The client store.</param>
        /// <param name="clientUriStore">The client URI store.</param>
        /// <param name="clientResourceStore">The client resource store.</param>
        /// <param name="clientGrantTypeStore">The client grant type store.</param>
        /// <param name="clientPropertyStore">The client property store.</param>
        /// <param name="discoveryResponseGenerator">The discovery response generator.</param>
        /// <param name="identityServerOptions">The options.</param>
        /// <param name="dymamicClientRegistrationOptions">The dymamic client registration options.</param>
        /// <exception cref="ArgumentNullException">options
        /// or
        /// clientStore
        /// or
        /// clientUriStore
        /// or
        /// clientResourceStore
        /// or
        /// clientPropertyStore
        /// or
        /// clientGrantTypeStore
        /// or
        /// discoveryResponseGenerator</exception>
        public RegisterClientService(IAdminStore <Client> clientStore,
                                     IAdminStore <ClientUri> clientUriStore,
                                     IAdminStore <ClientLocalizedResource> clientResourceStore,
                                     IAdminStore <ClientGrantType> clientGrantTypeStore,
                                     IAdminStore <ClientProperty> clientPropertyStore,
                                     IDiscoveryResponseGenerator discoveryResponseGenerator,
                                     IdentityServer4.Configuration.IdentityServerOptions identityServerOptions,
                                     IOptions <DynamicClientRegistrationOptions> dymamicClientRegistrationOptions)

        {
            _identityServerOptions1           = identityServerOptions ?? throw new ArgumentNullException(nameof(identityServerOptions));
            _dymamicClientRegistrationOptions = dymamicClientRegistrationOptions?.Value ?? throw new ArgumentNullException(nameof(dymamicClientRegistrationOptions));
            _clientStore                = clientStore ?? throw new ArgumentNullException(nameof(clientStore));
            _clientUriStore             = clientUriStore ?? throw new ArgumentNullException(nameof(clientUriStore));
            _clientResourceStore        = clientResourceStore ?? throw new ArgumentNullException(nameof(clientResourceStore));
            _clientPropertyStore        = clientPropertyStore ?? throw new ArgumentNullException(nameof(clientPropertyStore));
            _clientGrantTypeStore       = clientGrantTypeStore ?? throw new ArgumentNullException(nameof(clientGrantTypeStore));
            _discoveryResponseGenerator = discoveryResponseGenerator ?? throw new ArgumentNullException(nameof(discoveryResponseGenerator));
        }
        public PreIdentityServerMiddleware(
            ISingletonAutoObjectContainer <PreIdentityServerMiddleware, Dictionary <string, object> > objectCache,
            IConfiguration configuration,
            IClientSecretValidator clientValidator,
            IDiscoveryResponseGenerator responseGenerator,
            IEnumerable <IIdentityServerRequestTrackerEvaluator> evaluators,
            RequestDelegate next,
            ILogger <PreIdentityServerMiddleware> logger)
        {
            _objectCache   = objectCache;
            _configuration = configuration;

            _clientValidator   = clientValidator;
            _responseGenerator = responseGenerator;
            _evaluators        = evaluators;
            _next   = next;
            _logger = logger;

            KnownEndpointPaths = new List <string>()
            {
                "/.well-known/openid-configuration",
                "/.well-known/openid-configuration/jwks",
                "/connect/authorize",
                "/connect/token",
                "/connect/userinfo",
                "/connect/endsession",
                "/connect/checksession",
                "/connect/revocation",
                "/connect/introspect",
                "/connect/deviceauthorization"
            };
            PathRootUrl = _configuration["IdentityServerPublicFacingUri"];
            if (!string.IsNullOrEmpty(PathRootUrl))
            {
                PathRootUrl = PathRootUrl.TrimEnd('/');
                PathRootUrl = $"/{PathRootUrl}";
            }
        }