public class ApiKeyRealm
extends org.apache.shiro.realm.AuthorizingRealm
| Constructor and Description |
|---|
ApiKeyRealm(String name,
org.apache.shiro.cache.CacheManager cacheManager,
AuthIdentityManager<ApiKey> authIdentityManager,
PermissionManager permissionManager,
String anonymousId) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.shiro.authc.AuthenticationInfo |
doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken token)
Gets the AuthenticationInfo that matches a token.
|
protected org.apache.shiro.authz.AuthorizationInfo |
doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principals)
Gets the AuthorizationInfo that matches a token.
|
protected org.apache.shiro.cache.Cache<String,Set<org.apache.shiro.authz.Permission>> |
getAvailableRolesCache() |
protected Collection<org.apache.shiro.authz.Permission> |
getPermissions(String role) |
String |
getRolesCacheName() |
protected void |
onInit() |
void |
setName(String name) |
boolean |
supports(org.apache.shiro.authc.AuthenticationToken token)
Override the parent method to also accept anonymous tokens
|
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, setAuthorizationCache, setAuthorizationCacheName, setAuthorizationCachingEnabled, setPermissionResolver, setRolePermissionResolverassertCredentialsMatch, clearCachedAuthenticationInfo, getAuthenticationCache, getAuthenticationCacheKey, getAuthenticationCacheKey, getAuthenticationCacheName, getAuthenticationInfo, getAuthenticationTokenClass, getCredentialsMatcher, init, isAuthenticationCachingEnabled, isAuthenticationCachingEnabled, setAuthenticationCache, setAuthenticationCacheName, setAuthenticationCachingEnabled, setAuthenticationTokenClass, setCredentialsMatcherclearCache, getAvailablePrincipal, getCacheManager, getName, isCachingEnabled, onLogout, setCacheManager, setCachingEnabledpublic ApiKeyRealm(String name, org.apache.shiro.cache.CacheManager cacheManager, AuthIdentityManager<ApiKey> authIdentityManager, PermissionManager permissionManager, @Nullable String anonymousId)
protected void onInit()
onInit in class org.apache.shiro.realm.AuthorizingRealmpublic boolean supports(org.apache.shiro.authc.AuthenticationToken token)
supports in interface org.apache.shiro.realm.Realmsupports in class org.apache.shiro.realm.AuthenticatingRealmprotected org.apache.shiro.authc.AuthenticationInfo doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken token)
throws org.apache.shiro.authc.AuthenticationException
doGetAuthenticationInfo in class org.apache.shiro.realm.AuthenticatingRealmorg.apache.shiro.authc.AuthenticationExceptionprotected org.apache.shiro.authz.AuthorizationInfo doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principals)
doGetAuthorizationInfo in class org.apache.shiro.realm.AuthorizingRealmpublic void setName(String name)
setName in interface org.apache.shiro.util.NameablesetName in class org.apache.shiro.realm.AuthorizingRealmpublic String getRolesCacheName()
protected org.apache.shiro.cache.Cache<String,Set<org.apache.shiro.authz.Permission>> getAvailableRolesCache()
protected Collection<org.apache.shiro.authz.Permission> getPermissions(String role)
Copyright © 2016. All Rights Reserved.