Giter VIP home page Giter VIP logo

Comments (7)

haoxianrui avatar haoxianrui commented on July 17, 2024

@294640262
确认下面这两个问题:
1.解析JWT后看下authorities字段是否有角色id集合
2.看下权限角色规则是否正常加载到redis中

from youlai-mall.

294640262 avatar 294640262 commented on July 17, 2024

{ "alg": "RS256", "typ": "JWT" } { "user_name": "admin", "scope": ["all"], "id": 2, "exp": 1613726519, "authorities": ["2"], "jti": "5d9c81c8-0627-43fe-8293-9f6f1b718763", "client_id": "youlai-admin" }
1、以上为解析出来的结果,其中authorities带有角色id
2、权限角色规则是有存到redis中的,在进入.any()方法前,获取到的ahthorities为["ROLE_1","ROLE_2"]
还有其他可能的原因吗?代码我是直接跑起来的,没做改动

from youlai-mall.

haoxianrui avatar haoxianrui commented on July 17, 2024

@294640262 稍等你这个数据没问题

from youlai-mall.

haoxianrui avatar haoxianrui commented on July 17, 2024

@294640262 没做改动怎么会有user_name

from youlai-mall.

294640262 avatar 294640262 commented on July 17, 2024

这个可能是比较早之前拉的版本,刚才重新在gitee上拉了个最新的版本,也是同样的问题

from youlai-mall.

haoxianrui avatar haoxianrui commented on July 17, 2024

@294640262 github和gitee是同步的,我试了启动也没问题,线上的也ok,群里的小伙伴也没这个问题

from youlai-mall.

haoxianrui avatar haoxianrui commented on July 17, 2024

@294640262 试着把maven仓库清理下

from youlai-mall.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.