类 AuthRealm

java.lang.Object
org.apache.shiro.realm.CachingRealm
org.apache.shiro.realm.AuthenticatingRealm
org.apache.shiro.realm.AuthorizingRealm
com.abasecode.opencode.base.token.auth.AuthRealm
所有已实现的接口:
org.apache.shiro.authc.LogoutAware, org.apache.shiro.authz.Authorizer, org.apache.shiro.authz.permission.PermissionResolverAware, org.apache.shiro.authz.permission.RolePermissionResolverAware, org.apache.shiro.cache.CacheManagerAware, org.apache.shiro.realm.Realm, org.apache.shiro.util.Initializable, org.apache.shiro.util.Nameable

@Component public class AuthRealm extends org.apache.shiro.realm.AuthorizingRealm
作者:
Jon e-mail: ijonso123@gmail.com url: Jon's blog url: project github url: AbaseCode.com
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    (专用程序包) TokenConfig.ApiToken
     
    (专用程序包) CodeRedisUtils
     
    (专用程序包) org.springframework.data.redis.core.RedisTemplate
     
    (专用程序包) TokenHandler
     
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    protected org.apache.shiro.authc.AuthenticationInfo
    doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken token)
    doGetAuthenticationInfo
    protected org.apache.shiro.authz.AuthorizationInfo
    doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principals)
    doGetAuthorizationInfo
    boolean
    supports(org.apache.shiro.authc.AuthenticationToken token)
     

    从类继承的方法 org.apache.shiro.realm.AuthorizingRealm

    afterCacheManagerSet, checkPermission, checkPermission, checkPermission, checkPermissions, checkPermissions, checkPermissions, checkRole, checkRole, checkRoles, checkRoles, checkRoles, clearCachedAuthorizationInfo, doClearCache, getAuthorizationCache, getAuthorizationCacheKey, getAuthorizationCacheName, getAuthorizationInfo, getPermissionResolver, getPermissions, getRolePermissionResolver, hasAllRoles, hasRole, hasRole, hasRoles, hasRoles, isAuthorizationCachingEnabled, isPermitted, isPermitted, isPermitted, isPermitted, isPermitted, isPermitted, isPermittedAll, isPermittedAll, isPermittedAll, onInit, setAuthorizationCache, setAuthorizationCacheName, setAuthorizationCachingEnabled, setName, setPermissionResolver, setRolePermissionResolver

    从类继承的方法 org.apache.shiro.realm.AuthenticatingRealm

    assertCredentialsMatch, clearCachedAuthenticationInfo, getAuthenticationCache, getAuthenticationCacheKey, getAuthenticationCacheKey, getAuthenticationCacheName, getAuthenticationInfo, getAuthenticationTokenClass, getCredentialsMatcher, init, isAuthenticationCachingEnabled, isAuthenticationCachingEnabled, setAuthenticationCache, setAuthenticationCacheName, setAuthenticationCachingEnabled, setAuthenticationTokenClass, setCredentialsMatcher

    从类继承的方法 org.apache.shiro.realm.CachingRealm

    clearCache, getAvailablePrincipal, getCacheManager, getName, isCachingEnabled, onLogout, setCacheManager, setCachingEnabled

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    从接口继承的方法 org.apache.shiro.util.Initializable

    init
  • 字段详细资料

    • tokenHandler

      @Autowired TokenHandler tokenHandler
    • redisTemplate

      @Autowired org.springframework.data.redis.core.RedisTemplate redisTemplate
    • codeRedisUtils

      @Autowired CodeRedisUtils codeRedisUtils
    • apiToken

      @Autowired TokenConfig.ApiToken apiToken
  • 构造器详细资料

    • AuthRealm

      public AuthRealm()
  • 方法详细资料

    • supports

      public boolean supports(org.apache.shiro.authc.AuthenticationToken token)
      指定者:
      supports 在接口中 org.apache.shiro.realm.Realm
      覆盖:
      supports 在类中 org.apache.shiro.realm.AuthenticatingRealm
    • doGetAuthorizationInfo

      protected org.apache.shiro.authz.AuthorizationInfo doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principals)
      doGetAuthorizationInfo
      指定者:
      doGetAuthorizationInfo 在类中 org.apache.shiro.realm.AuthorizingRealm
      参数:
      principals - PrincipalCollection
      返回:
      AuthorizationInfo
    • doGetAuthenticationInfo

      protected org.apache.shiro.authc.AuthenticationInfo doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken token) throws org.apache.shiro.authc.AuthenticationException
      doGetAuthenticationInfo
      指定者:
      doGetAuthenticationInfo 在类中 org.apache.shiro.realm.AuthenticatingRealm
      参数:
      token - AuthenticationToken
      返回:
      AuthenticationInfo
      抛出:
      org.apache.shiro.authc.AuthenticationException