打开 关闭

Add/Update CurrentUser Claims #2720


User avatar
0
viswajwalith 创建

ABP Framework version: v5.1.3

UI type: MVC

DB provider: EF Core / MongoDB

Tiered (MVC) or Identity Server Separated (Angular): yes / Microservice

How to add/update claims to CurrentUser without using 'ClaimsPrincipalContributor'.

ClaimsPrincipalContributor triggers while user login.

We have a requirement to add/update claims based on our custom logic after user logged in. We are adding claims to identity but it is not updating in CurrentUser. Is there any possibility to refresh user to update claims in CurrentUser, or is there any other possibility to get claims added to identity from AppService/Web


2 答案
  • User Avatar
    0
    maliming 创建
    支持团队 Fullstack Developer

    hi

    Is there any possibility to refresh user to update claims in CurrentUser

    This seems impossible, you can consider accessing these dynamic values in the cache

  • User Avatar
    0
    viswajwalith 创建

    hi

    Is there any possibility to refresh user to update claims in CurrentUser

    This seems impossible, you can consider accessing these dynamic values in the cache

    Thanks for the update.

Made with ❤️ on ABP v8.2.0-preview Updated on 三月 25, 2024, 15:11