Last post Feb 26, 2015 10:09 PM by rajarameshvarma1
Feb 26, 2015 04:24 PM|rajarameshvarma1|LINK
I am trying to create a custom user service for the Identity server. My user store will be multiple Active Directories. I have implemented Local Login.
public Task<AuthenticateResult> AuthenticateLocalAsync(string username, string password, SignInMessage message)
AuthenticationService service = new AuthenticationService();
ResponseStatus status = service.Authenticate(username, password);
if(status == ResponseStatus.Success)
Subject = username,
Username = username,
Claims = new List<Claim>
new Claim(Constants.ClaimTypes.PreferredUserName, username)
return Task.FromResult<AuthenticateResult>(new AuthenticateResult(user.Subject, user.Username));
"Users" is a static List of CustomUser class. If I understand correctly this "Users" list will be in the memory and is used in other methods like "IsActiveAsync".
public Task<bool> IsActiveAsync(ClaimsPrincipal subject)
var user = Users.SingleOrDefault(x => x.Subject == subject.GetSubjectId());
return Task.FromResult(user != null);
Does this really help when I am using AD as this is not going to check if the user is active in AD. Do we really need to keep users in the memory? Or Is my implementation is off the track for this scenario?
Thanks for the help.
Feb 26, 2015 05:55 PM|BrockAllen|LINK
You really should post your IdentityServer questions to the github forums.
Feb 26, 2015 10:09 PM|rajarameshvarma1|LINK
Thanks Allen. Just posted but I don't have rights to mark it as a question. so it is an issue for now.