• SpringSecurity常用权限


    表达式描述
    hasRole([role]) 当前用户是否拥有指定角色。
    hasAnyRole([role1,role2]) 多个角色是一个以逗号进行分隔的字符串。如果当前用户拥有指定角色中的任意一个则返回true。
    hasAuthority([auth]) 等同于hasRole
    hasAnyAuthority([auth1,auth2]) 等同于hasAnyRole
    Principle 代表当前用户的principle对象
    authentication 直接从SecurityContext获取的当前Authentication对象
    permitAll 总是返回true,表示允许所有的
    denyAll 总是返回false,表示拒绝所有的
    isAnonymous() 当前用户是否是一个匿名用户
    isRememberMe() 表示当前用户是否是通过Remember-Me自动登录的
    isAuthenticated() 表示当前用户是否已经登录认证成功了。
    isFullyAuthenticated() 如果当前用户既不是一个匿名用户,同时又不是通过Remember-Me自动登录的,则返回true。
  • 相关阅读:
    BJDCTF-WP
    Python 每日一练(4)
    Python 每日一练(3)
    BUUCTF Crypto
    Python每日一练(1)
    Python 每日一练(2)
    oracle 组函数
    oracle 组函数
    oracle
    前端实战遇到问题
  • 原文地址:https://www.cnblogs.com/yangzhixue/p/12434561.html
Copyright © 2020-2023  润新知