Ejemplo n.º 1
0
 public ConsentController(
     IClientStore clientStore,
     IIdentityServerService identityServerService)
 {
     this.clientStore           = clientStore;
     this.identityServerService = identityServerService;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor of the <see cref="HttpClientServiceFactory" />.
        /// </summary>
        /// <param name="configuration">Application configuration properties.</param>
        /// <param name="coreHttpClient">An <see cref="ICoreHttpClient"/> implementation that will execute the HTTP requests.</param>
        /// <param name="requestMessageFactory">The <see cref="IHttpRequestMessageFactory"/> to get a new <see cref="HttpRequestMessage"/>.</param>
        /// <param name="tokenResponseService">The <see cref="IIdentityServerService"/> to retrieve a token, if required.</param>
        public HttpClientServiceFactory(IConfiguration configuration, ICoreHttpClient coreHttpClient, IHttpRequestMessageFactory requestMessageFactory, IIdentityServerService tokenResponseService)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            if (coreHttpClient == null)
            {
                throw new ArgumentNullException(nameof(coreHttpClient));
            }

            if (requestMessageFactory == null)
            {
                throw new ArgumentNullException(nameof(requestMessageFactory));
            }

            if (tokenResponseService == null)
            {
                throw new ArgumentNullException(nameof(tokenResponseService));
            }

            _configuration         = configuration;
            _coreHttpClient        = coreHttpClient;
            _tokenResponseService  = tokenResponseService;
            _requestMessageFactory = requestMessageFactory;
        }
Ejemplo n.º 3
0
        private HttpClientServiceFactory()
        {
            //no configuration for Dektop
            _configuration = null;
            var identityServerHttpClient = new HttpClient();

            _coreHttpClient = new CoreHttpClient(
                new HttpClient()
                );

            _tokenResponseService = new IdentityServerService(
                new IdentityServerHttpClientSelector(
                    new List <IIdentityServerHttpClient>
            {
                { new ClientCredentialsHttpClient(identityServerHttpClient) },
                { new PasswordHttpClient(identityServerHttpClient) }
            }
                    ),
                new TokenResponseCacheManager(
                    new MemoryCache(
                        Options.Create(
                            new MemoryCacheOptions()
                            )
                        )
                    )
                );

            _requestMessageFactory = new HttpRequestMessageFactoryDesktop();
        }
Ejemplo n.º 4
0
    internal HttpClientService(ICoreHttpClient coreHttpClient, IHttpRequestMessageFactory requestMessageFactory, IIdentityServerService accessTokenService)
    {
        _coreHttpClient        = coreHttpClient;
        _requestMessageFactory = requestMessageFactory;
        _accessTokenService    = accessTokenService;

        Headers = new HttpClientServiceHeaders();
    }
Ejemplo n.º 5
0
 public GrantsController(
     IIdentityServerInteractionService interaction,
     IIdentityServerService identityServerService,
     IEventService events)
 {
     this.interaction           = interaction;
     this.identityServerService = identityServerService;
     this.events = events;
 }
Ejemplo n.º 6
0
 public ExternalController(
     SignInManager <IdentityUser> signInManager,
     IIdentityServerInteractionService interaction,
     IIdentityServerService identityServerService,
     IEventService events)
 {
     this.signInManager         = signInManager;
     this.interaction           = interaction;
     this.identityServerService = identityServerService;
     this.events = events;
 }
Ejemplo n.º 7
0
 public AccountController(
     UserManager <IdentityUser> userManager,
     SignInManager <IdentityUser> signInManager,
     IIdentityServerInteractionService interaction,
     IClientStore clientStore,
     IIdentityServerService identityServerService,
     IEventService events)
 {
     this.userManager           = userManager;
     this.signInManager         = signInManager;
     this.interaction           = interaction;
     this.clientStore           = clientStore;
     this.identityServerService = identityServerService;
     this.events = events;
 }
Ejemplo n.º 8
0
 public DeviceController(IIdentityServerService identityServerService) =>
 this.identityServerService = identityServerService;
Ejemplo n.º 9
0
 public ResourceStore(IIdentityServerService identityServerService)
 {
     _identityServerService = identityServerService;
 }
Ejemplo n.º 10
0
 public ClientStore(IIdentityServerService identityServerService)
 {
     _identityServerService = identityServerService;
 }