Class LdapRealm
java.lang.Object
org.apache.shiro.realm.CachingRealm
org.apache.shiro.realm.AuthenticatingRealm
org.apache.shiro.realm.AuthorizingRealm
org.apache.shiro.realm.ldap.AbstractLdapRealm
fr.gouv.vitam.common.auth.core.realm.LdapRealm
- All Implemented Interfaces:
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
public class LdapRealm
extends org.apache.shiro.realm.ldap.AbstractLdapRealm
Realm query Ldap to get users role
-
Field Summary
Fields inherited from class org.apache.shiro.realm.ldap.AbstractLdapRealm
principalSuffix, searchBase, searchFilter, systemPassword, systemUsername, url -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.shiro.authc.AuthenticationInfoqueryForAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken token, org.apache.shiro.realm.ldap.LdapContextFactory ldapContextFactory) protected org.apache.shiro.authz.AuthorizationInfoqueryForAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principals, org.apache.shiro.realm.ldap.LdapContextFactory ldapContextFactory) voidsetGroupRequestFilter(String groupRequestFilter) set the group request filter, defined in shiro.inivoidsetGroupRolesMap(Map<String, String> groupRolesMap) set the map of group role, defined in shiro.inivoidsetUserDnTemplate(String userDnTemplate) set Template to convert username to dn, defined in shiro.iniMethods inherited from class org.apache.shiro.realm.ldap.AbstractLdapRealm
doGetAuthenticationInfo, doGetAuthorizationInfo, onInit, setLdapContextFactory, setPrincipalSuffix, setSearchBase, setSearchFilter, setSystemPassword, setSystemUsername, setUrlMethods inherited from class 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, setAuthorizationCache, setAuthorizationCacheName, setAuthorizationCachingEnabled, setName, setPermissionResolver, setRolePermissionResolverMethods inherited from class org.apache.shiro.realm.AuthenticatingRealm
assertCredentialsMatch, clearCachedAuthenticationInfo, getAuthenticationCache, getAuthenticationCacheKey, getAuthenticationCacheKey, getAuthenticationCacheName, getAuthenticationInfo, getAuthenticationTokenClass, getCredentialsMatcher, init, isAuthenticationCachingEnabled, isAuthenticationCachingEnabled, setAuthenticationCache, setAuthenticationCacheName, setAuthenticationCachingEnabled, setAuthenticationTokenClass, setCredentialsMatcher, supportsMethods inherited from class org.apache.shiro.realm.CachingRealm
clearCache, getAvailablePrincipal, getCacheManager, getName, isCachingEnabled, onLogout, setCacheManager, setCachingEnabledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.shiro.util.Initializable
init
-
Constructor Details
-
LdapRealm
public LdapRealm()
-
-
Method Details
-
setGroupRequestFilter
set the group request filter, defined in shiro.ini- Parameters:
groupRequestFilter-
-
setGroupRolesMap
set the map of group role, defined in shiro.ini- Parameters:
groupRolesMap-
-
setUserDnTemplate
set Template to convert username to dn, defined in shiro.ini- Parameters:
userDnTemplate-
-
queryForAuthenticationInfo
protected org.apache.shiro.authc.AuthenticationInfo queryForAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken token, org.apache.shiro.realm.ldap.LdapContextFactory ldapContextFactory) throws NamingException - Specified by:
queryForAuthenticationInfoin classorg.apache.shiro.realm.ldap.AbstractLdapRealm- Throws:
NamingException
-
queryForAuthorizationInfo
protected org.apache.shiro.authz.AuthorizationInfo queryForAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principals, org.apache.shiro.realm.ldap.LdapContextFactory ldapContextFactory) throws NamingException - Specified by:
queryForAuthorizationInfoin classorg.apache.shiro.realm.ldap.AbstractLdapRealm- Throws:
NamingException
-