问题
I have an existing database that holds user credentials as well a map of what applications those user credentials have access to. In identity server I have each application setup as a client and users can authenticate successful. However, any user gets authorized for any application. I am wondering if there is a way that I can access which client is being requested from my implementation of IUserService? This way I can check if they are authorized for that app.
回答1:
IdentityServer allows for custom validation of the requests via the ICustomRequestValidator
interface. You can implement this and return an error to prevent a user from getting a token for a client.
Let us know on the github issue tracker if you have more feedback on this.
来源:https://stackoverflow.com/questions/27823150/access-requested-client-from-iuserservice