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);
CustomUser user;
if(status == ResponseStatus.Success)
{
user =
new CustomUser()
{
Subject = username,
Username = username,
Claims = new List<Claim>
{
new Claim(Constants.ClaimTypes.PreferredUserName, username)
}
};
Users.Add(user);
return ...
Go to the complete details ...