/// <summary> /// Constructor /// </summary> /// <param name="userStore">LDAP User Store</param> /// <param name="events">IEventService</param> /// <param name="tools">IdentityServerTools</param> public LdapController( ILdapUserStore userStore, IEventService events, IdentityServerTools tools) { this.userStore = userStore; this.events = events; this.tools = tools; }
public ExternalController( IIdentityServerInteractionService interaction, IClientStore clientStore, IEventService events, ILogger <ExternalController> logger, ILdapUserStore users = null) { _users = users; _interaction = interaction; _clientStore = clientStore; _logger = logger; _events = events; }
public AccountController( IIdentityServerInteractionService interaction, IClientStore clientStore, IHttpContextAccessor httpContextAccessor, IAuthenticationSchemeProvider schemeProvider, IEventService events, ILdapUserStore userStore) { _interaction = interaction; _events = events; _userStore = userStore; // Should we modify in the service? good question... _account = new AccountService(interaction, httpContextAccessor, schemeProvider, clientStore); }
public AccountController( IIdentityServerInteractionService interaction, IClientStore clientStore, IAuthenticationSchemeProvider schemeProvider, IEventService events, ILdapUserStore users = null) { _users = users; // Should use the LdapStore. _interaction = interaction; _clientStore = clientStore; _schemeProvider = schemeProvider; _events = events; }
/// <summary> /// Constructor /// </summary> /// <param name="logger">Logger</param> /// <param name="events">Event service</param> /// <param name="interaction">Idsrc interaction service</param> /// <param name="schemeProvider">Authentication scheme provider</param> /// <param name="userStore">User store</param> /// <param name="clientStore">Client store</param> public AccountController( ILogger <AccountController> logger, IEventService events, IIdentityServerInteractionService interaction, IAuthenticationSchemeProvider schemeProvider, ILdapUserStore userStore, IClientStore clientStore) { this.logger = logger; this.events = events; this.interaction = interaction; this.schemeProvider = schemeProvider; this.userStore = userStore; this.clientStore = clientStore; }
public AccountController( UserManager <ApplicationUser> userManager, RoleManager <ApplicationRole> roleManager, IPersistedGrantService persistedGrantService, SignInManager <ApplicationUser> signInManager, ILoggerFactory loggerFactory, IIdentityServerInteractionService interaction, IClientStore clientStore, ILdapUserStore userStore, IEventService events) { _userManager = userManager; _roleManager = roleManager; _persistedGrantService = persistedGrantService; _signInManager = signInManager; _logger = loggerFactory.CreateLogger <AccountController>(); _interaction = interaction; _clientStore = clientStore; _userStore = userStore; _events = events; }
public AccountController(IIdentityServerInteractionService interaction, ILdapUserStore <LdapUser> users, IEventService events, ILoginManager <LdapUser> login, IEmailService mail, IViewRenderService viewRenderService, SigningCredentials signingCredentials) { this._interaction = interaction; this._users = users; this._events = events; this._login = login; this._mail = mail; this._viewRenderService = viewRenderService; this._signingCredentials = signingCredentials; this._tokenValidationParameters = new TokenValidationParameters { ValidIssuer = "https://account.vcp.sh", ValidateAudience = false, IssuerSigningKey = this._signingCredentials.Key, ValidateIssuerSigningKey = true, ValidateIssuer = true, ValidateLifetime = true, ValidateTokenReplay = true }; }
/// <summary> /// Initializes a new instance of the <see cref="LdapUserProfileService"/> class. /// </summary> /// <param name="users">The users.</param> /// <param name="logger">The logger.</param> public LdapUserProfileService(ILdapUserStore users, ILogger <LdapUserProfileService> logger) { Users = users; Logger = logger; }
public HostProfileService(ILdapUserStore users, ILogger <LdapUserProfileService> logger) : base(users, logger) { }
/// <summary> /// Initializes a new instance of the <see cref="LdapUserResourceOwnerPasswordValidator{TUser}"/> class. /// </summary> /// <param name="users">The users.</param> /// <param name="clock">The clock.</param> public LdapUserResourceOwnerPasswordValidator(ILdapUserStore users, ISystemClock clock) { _users = users; _clock = clock; }
/// <summary> /// Adds Ldap Users to identity server. /// </summary> /// <typeparam name="TUserDetails">The type of the user details.</typeparam> /// <typeparam name="TCustomUserStore">The type of the custom user store.</typeparam> /// <param name="builder">The builder.</param> /// <param name="configuration">The ldap configuration.</param> /// <param name="customUserStore">The custom user store (ILdapUserStore).</param> /// <returns> /// Returns the builder instance /// </returns> public static IIdentityServerBuilder AddLdapUsers <TUserDetails, TCustomUserStore>(this IIdentityServerBuilder builder, IConfiguration configuration, ILdapUserStore customUserStore) where TUserDetails : IAppUser, new() { RegisterLdapConfigurations(builder, configuration); builder.Services.AddSingleton <ILdapService <TUserDetails>, LdapService <TUserDetails> >(); // For testing purpose we can use the in memory. In reality it's better to have // your own implementation. An example with Redis exists in the repository builder.Services.AddSingleton(customUserStore); builder.AddProfileService <LdapUserProfileService <TUserDetails> >(); builder.AddResourceOwnerValidator <LdapUserResourceOwnerPasswordValidator <TUserDetails> >(); return(builder); }