Open Closed

abp CookieAuthenticationOptions,IntrospectAccessToken #10288


User avatar
0
heshengli created

Potentially sensitive application claims were excluded from the introspection response as the client 'EAP' was not explicitly listed as an audience. [OpenIddict.Server.OpenIddictServerDispatcher] The response was successfully returned as a JSON document: { "active": false }. The access_token is not active. IntrospectAccessToken 在什么情况下使用

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

35 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    可能是access token过期了, 但是CheckTokenExpiration应该会直接注销当前用户.

    目前UI的行为是?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    heshengli created

    我们使用的是默认的IntrospectAccessToken,UI 上显示还是已登录状态,菜单权限都丢失了, IntrospectAccessToken The access_token is not active.触发退出登录后,会重定向重新登录

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    当UI显示登录状态, 菜单丢失的情况下.

    1. 复制CheckTokenExpiration的源码并在你的项目中使用它. 参考: https://abp.io/support/questions/10288/abp-CookieAuthenticationOptionsIntrospectAccessToken?CurrentPage=1#answer-3a1eb47c-376b-fd86-91bf-71e71ddf1528
    2. 设置断点, 刷新页面 CheckTokenExpiration 是否回检测到The access_token is not active. 然后注销?

    如果执行了注销的逻辑 UI 就不会显示登录状态了

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    heshengli created

    Cookie 365天 Cookie的AccessToken 有效期多长时间, var accessToken = principalContext.Properties.GetTokenValue("access_token");

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    你先按照我的步骤测试下注销问题

    https://abp.io/support/questions/10288/abp-CookieAuthenticationOptionsIntrospectAccessToken?CurrentPage=2#answer-3a1ec344-4742-88be-d55d-b7f47a3a015b

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    heshengli created

    当我们收藏一个openiddict 的重定向地址,间隔很多天后,使用这个链接跳转登录后,偶发权限丢失 正常情况 异常情况

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    不要收藏这个URL 它的一些参数是有有效期的

    你可以在自定义的CheckTokenExpiration方法中输出一些日志, 看看丢失权限的时候 的access token情况

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    你也可以试试在认证信息不存在的情况下注销

    参考: https://github.com/abpframework/abp/pull/24645

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    heshengli created

    好的 我们在退出登录,同时也删除了当前用户的缓存

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    好的

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on October 08, 2026, 12:23
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.