/// <summary>
 /// Initializes a new instance of the <see cref="DeviceAuthorizationResponseGenerator"/> class.
 /// </summary>
 /// <param name="options">The options.</param>
 /// <param name="userCodeService">The user code service.</param>
 /// <param name="deviceFlowCodeService">The device flow code service.</param>
 /// <param name="clock">The clock.</param>
 /// <param name="logger">The logger.</param>
 public DeviceAuthorizationResponseGenerator(IdentityServerOptions options, IUserCodeService userCodeService, IDeviceFlowCodeService deviceFlowCodeService, ISystemClock clock, ILogger <DeviceAuthorizationResponseGenerator> logger)
 {
     Options               = options;
     UserCodeService       = userCodeService;
     DeviceFlowCodeService = deviceFlowCodeService;
     Clock  = clock;
     Logger = logger;
 }
 public DefaultDeviceFlowInteractionService(
     IClientStore clients,
     IUserSession session,
     IDeviceFlowCodeService devices,
     ILogger <DefaultDeviceFlowInteractionService> logger)
 {
     _clients = clients;
     _session = session;
     _devices = devices;
     _logger  = logger;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DeviceCodeValidator"/> class.
 /// </summary>
 /// <param name="devices">The devices.</param>
 /// <param name="profile">The profile.</param>
 /// <param name="throttlingService">The throttling service.</param>
 /// <param name="systemClock">The system clock.</param>
 /// <param name="logger">The logger.</param>
 public DeviceCodeValidator(
     IDeviceFlowCodeService devices,
     IProfileService profile,
     IDeviceFlowThrottlingService throttlingService,
     ISystemClock systemClock,
     ILogger <DeviceCodeValidator> logger)
 {
     _devices           = devices;
     _profile           = profile;
     _throttlingService = throttlingService;
     _systemClock       = systemClock;
     _logger            = logger;
 }
Exemple #4
0
        public static IDeviceCodeValidator CreateDeviceCodeValidator(
            IDeviceFlowCodeService service,
            IProfileService profile = null,
            IDeviceFlowThrottlingService throttlingService = null,
            ISystemClock clock = null)
        {
            profile           = profile ?? new TestProfileService();
            throttlingService = throttlingService ?? new TestDeviceFlowThrottlingService();
            clock             = clock ?? new StubClock();

            var validator = new DeviceCodeValidator(service, profile, throttlingService, clock, TestLogger.Create <DeviceCodeValidator>());

            return(validator);
        }
 public DefaultDeviceFlowInteractionService(
     IClientStore clients,
     IUserSession session,
     IDeviceFlowCodeService devices,
     IResourceStore resourceStore,
     IScopeParser scopeParser,
     ILogger <DefaultDeviceFlowInteractionService> logger)
 {
     _clients       = clients;
     _session       = session;
     _devices       = devices;
     _resourceStore = resourceStore;
     _scopeParser   = scopeParser;
     _logger        = logger;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DeviceCodeValidator"/> class.
 /// </summary>
 /// <param name="devices">The devices.</param>
 /// <param name="profile">The profile.</param>
 /// <param name="throttlingService">The throttling service.</param>
 /// <param name="systemClock">The system clock.</param>
 /// <param name="logger">The logger.</param>
 public MyDeviceCodeValidator(
     IScopedContext <TenantRequestContext> scopedTenantRequestContext,
     IScopedOptionalClaims scopedOptionalClaims,
     IDeviceFlowCodeService devices,
     IProfileService profile,
     IDeviceFlowThrottlingService throttlingService,
     ISystemClock systemClock,
     ILogger <MyDeviceCodeValidator> logger)
 {
     _scopedTenantRequestContext = scopedTenantRequestContext;
     _scopedOptionalClaims       = scopedOptionalClaims;
     _devices           = devices;
     _profile           = profile;
     _throttlingService = throttlingService;
     _systemClock       = systemClock;
     _logger            = logger;
 }