如何将ui_locales从AuthorizeRequest传递到控制器 [英] How to pass ui_locales from AuthorizeRequest to the controller

查看:84
本文介绍了如何将ui_locales从AuthorizeRequest传递到控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆