Is there a property in the context variable (ResourceOwnerPasswordValidationContext) that lets me access the IP address of the client sending the initial request for an auth.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
There is no information like that for you to grab within that context. Your only Option is to inject IHttpContextAccessor
into your ResourceOwnerPasswordValidator
and then you can get the request IP from the HttpContext.Request
object.
标签:
IdentityServer4