V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
qweruiop
V2EX  ›  问与答

请教一下 web 里的权限控制的最佳实践

  •  
  •   qweruiop · Feb 11, 2024 · 1558 views
    This topic created in 806 days ago, the information mentioned may be changed or developed.

    现在开发都前后端分离了,web 里面有 2 种路由 1 ,web 的路由 例: /user, /product 2 ,api 的路由 /api/user/create /api/product/buy 等。

    传统的是通过一些权限框架(如 shiro )把在 web 那通过拦截器对 web 的路由进行拦截,然后页面里面允许管理员创建安全组,但是感觉每个页面又会调用很多 api ,那 api 的权限又需要额外配置一次。感觉很冗余,不知道大家的最佳实践都一般是怎么搞的啊。。。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4417 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 04:11 · PVG 12:11 · LAX 21:11 · JFK 00:11
    ♥ Do have faith in what you're doing.