Example #1
0
 public DefaultDiscoveryResponseGenerator(
     PolicyServerOptions options,
     ILogger <DefaultDiscoveryResponseGenerator> logger
     )
 {
     _options = options;
     _logger  = logger;
 }
Example #2
0
 public DefaultClientConfigurationValidator(
     PolicyServerOptions options,
     IPolicyConfigurationValidator policyConfigurationValidator
     )
 {
     _options = options;
     _policyConfigurationValidator = policyConfigurationValidator;
 }
 public DefaultPolicyRequestParser(
     PolicyServerOptions options,
     IClientStore clientStore
     )
 {
     _options     = options;
     _clientStore = clientStore;
 }
Example #4
0
 public DiscoveryEndpoint(
     PolicyServerOptions options,
     IDiscoveryResponseGenerator responseGenerator,
     ILogger <DiscoveryEndpoint> logger
     )
 {
     _logger            = logger;
     _options           = options;
     _responseGenerator = responseGenerator;
 }
 public EndpointRouter(
     IEnumerable <Endpoint> endpoints,
     PolicyServerOptions options,
     ILogger <EndpointRouter> logger
     )
 {
     _endpoints = endpoints;
     _options   = options;
     _logger    = logger;
 }
 public DefaultPermissionRequestParser(
     PolicyServerOptions options,
     IClientStore clientStore,
     ILogger <DefaultPermissionRequestParser> logger
     )
 {
     _options     = options;
     _clientStore = clientStore;
     _logger      = logger;
 }
 public CachingPermissionStore(
     PolicyServerOptions options,
     T inner,
     ICache <PolicyPermission> cache,
     ILogger <CachingPermissionStore <T> > logger
     )
 {
     _options = options;
     _inner   = inner;
     _cache   = cache;
     _logger  = logger;
 }
 public CachingPolicyService(
     PolicyServerOptions options,
     T inner,
     ICache <PolicyResult> cache,
     ILogger <CachingPolicyService <T> > logger
     )
 {
     _options = options;
     _inner   = inner;
     _cache   = cache;
     _logger  = logger;
 }
 public CachingClientStore(
     PolicyServerOptions options,
     T inner,
     ICache <Client> cache,
     ILogger <CachingClientStore <T> > logger
     )
 {
     _options = options;
     _inner   = inner;
     _cache   = cache;
     _logger  = logger;
 }
Example #10
0
        public static String GetPolicyServerIssuerUri(this HttpContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            PolicyServerOptions options = context.RequestServices.GetRequiredService <PolicyServerOptions>();
            String uri = options.IssuerUri;

            if (uri.IsMissing())
            {
                uri = context.GetPolicyServerOrigin() + context.GetPolicyServerBasePath();
                if (uri.EndsWith("/"))
                {
                    uri = uri.Substring(0, uri.Length - 1);
                }
                uri = uri.ToLowerInvariant();
            }

            return(uri);
        }
Example #11
0
 public DefaultPolicyConfigurationValidator(PolicyServerOptions options)
 {
     _options = options;
 }
Example #12
0
 public BaseUrlMiddleware(RequestDelegate next, PolicyServerOptions options)
 {
     _next    = next;
     _options = options;
 }