To achieve this you can use ProfileService. You have access to Client info on the RequestContext information. I suggest you to read the Doc as its best reference.
And if you want to add your own user store, you should do sth like what is done for TestUsers:
- Add your custom
UserStore
- Add your custom
ProfileService
- Add your custom
ResourceOwnerValidator
- Add them to
IIdentityServerBuilder like this:
builder.Services.AddSingleton(new CustomUserStore(users));
builder.AddProfileService<CustomProfileService>(); builder.AddResourceOwnerValidator<CustomResourceOwnerPasswordValidator>();
here is an other question regarding custom userstore with all details