public class SillyRealm
extends org.apache.shiro.realm.AuthorizingRealm
Constructor and Description |
---|
SillyRealm() |
Modifier and Type | Method and Description |
---|---|
protected org.apache.shiro.authc.AuthenticationInfo |
doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken token) |
protected org.apache.shiro.authz.AuthorizationInfo |
doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principals) |
protected org.apache.shiro.authc.SimpleAccount |
getAccount(String username)
Simulates a call to an underlying data store - in a 'real' application, this call would
communicate with an underlying data store via an EIS API (JDBC, JPA, Hibernate, etc).
|
afterCacheManagerSet, checkPermission, checkPermission, checkPermission, checkPermissions, checkPermissions, checkPermissions, checkRole, checkRole, checkRoles, checkRoles, checkRoles, clearCachedAuthorizationInfo, doClearCache, getAuthorizationCache, getAuthorizationCacheKey, getAuthorizationCacheName, getAuthorizationInfo, getPermissionResolver, getRolePermissionResolver, hasAllRoles, hasRole, hasRole, hasRoles, hasRoles, isAuthorizationCachingEnabled, isPermitted, isPermitted, isPermitted, isPermitted, isPermitted, isPermittedAll, isPermittedAll, isPermittedAll, onInit, setAuthorizationCache, setAuthorizationCacheName, setAuthorizationCachingEnabled, setName, setPermissionResolver, setRolePermissionResolver
assertCredentialsMatch, clearCachedAuthenticationInfo, getAuthenticationCache, getAuthenticationCacheKey, getAuthenticationCacheKey, getAuthenticationCacheName, getAuthenticationInfo, getAuthenticationTokenClass, getCredentialsMatcher, init, isAuthenticationCachingEnabled, isAuthenticationCachingEnabled, setAuthenticationCache, setAuthenticationCacheName, setAuthenticationCachingEnabled, setAuthenticationTokenClass, setCredentialsMatcher, supports
clearCache, getAvailablePrincipal, getCacheManager, getName, isCachingEnabled, onLogout, setCacheManager, setCachingEnabled
protected org.apache.shiro.authc.SimpleAccount getAccount(String username)
AuthenticatingRealm
superclass will do that automatically via the use of a configured
CredentialsMatcher
(see this
example's corresponding shiro.ini
file to see a configured credentials matcher).
All that is required is that the account information include directly the credentials found
in the EIS.username
- the username for the account data to retrieveprotected 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.AuthenticatingRealm
org.apache.shiro.authc.AuthenticationException
protected org.apache.shiro.authz.AuthorizationInfo doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principals)
doGetAuthorizationInfo
in class org.apache.shiro.realm.AuthorizingRealm
Copyright © 2015. All rights reserved.