如何将ui_locales从AuthorizeRequest传递到控制器 [英] How to pass ui_locales from AuthorizeRequest to the controller
问题描述
在Identityserver3中,在AuthorizeInteractionResponseGenerator
中创建了SignInMessage.但是在IdentityServer4中,没有SignInMessage传递给我的Login操作.
In Identityserver3 there was the SignInMessage that was created in the AuthorizeInteractionResponseGenerator
. But in IdentityServer4 there is no SignInMessage passed to my Login action.
那么我如何通过授权调用中给出的ui_locales?
So how do I pass through the ui_locales that is given in the authorize call?
推荐答案
我知道了.我需要在控制器中注入IIdentityServerInteractionService
.然后在我的登录操作中,我可以获得
I figured it out. I need to inject the IIdentityServerInteractionService
in my controller. Then in my Login action I can get the authorization context like
var context = await _interaction.GetAuthorizationContextAsync(returnUrl);
此context
包含UILocales.
This context
contains the UILocales.
这篇关于如何将ui_locales从AuthorizeRequest传递到控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!