Azure B2C自定义声明 [英] Azure B2C custom claims

查看:125
本文介绍了Azure B2C自定义声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我已经成功添加了一个自定义的rest API终结点,该终结点在每次运行自定义登录策略时都会调用.用户在azure b2c登录表单中输入凭据,其余的API端点返回自定义声明,这些声明已添加到令牌中.

I have successfully added a custom rest API endpoint which is called everytime I run my custom login policy. The user enters credentials in the azure b2c login form and rest API endpoint returns custom claims which are added in the token.

现在的问题是,一旦我获得令牌并且用户登录我的SPA,我想在动态条件下再次添加自定义声明(通过自定义策略再次点击自定义API端点),但是我不希望用户这样做再次通过azure b2c登录表单. 我该怎么做??

Now the issue is, once I get the token and user logs into the my SPA, I want to again add custom claims ( by again hitting custom API endpoint through custom policy may be) on dynamic conditions but I don't want the user to go through azure b2c login form again. How can I accomplish this ???

推荐答案

现在的问题是,一旦获得令牌并用户登录到我的SPA,我想再次添加自定义声明(再次通过自定义策略击中自定义API端点可能是)在动态条件下,但我不希望用户通过azure b2c 再次登录表单.我该怎么做??
Now the issue is, once I get the token and user logs into the my SPA, I want to again add custom claims ( by again hitting custom API endpoint through custom policy may be) on dynamic conditions but I don't want the user to go through azure b2c login form again. How can I accomplish this ???

为此,您必须实现Azure AD Graph API.您可以找到 文档放在此处.

For this you would have to implement Azure AD Graph API. You can find the documentation on the same here.

另外,您还可以阅读

Also, for additional read you could refer to the StackoverFlow thread on similar scenario.

 

 


这篇关于Azure B2C自定义声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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