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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.apache.shiro.authc.AuthenticationInfo
    queryForAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken token, org.apache.shiro.realm.ldap.LdapContextFactory ldapContextFactory)
     
    protected org.apache.shiro.authz.AuthorizationInfo
    queryForAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principals, org.apache.shiro.realm.ldap.LdapContextFactory ldapContextFactory)
     
    void
    setGroupRequestFilter(String groupRequestFilter)
    set the group request filter, defined in shiro.ini
    void
    set the map of group role, defined in shiro.ini
    void
    setUserDnTemplate(String userDnTemplate)
    set Template to convert username to dn, defined in shiro.ini

    Methods inherited from class org.apache.shiro.realm.ldap.AbstractLdapRealm

    doGetAuthenticationInfo, doGetAuthorizationInfo, onInit, setLdapContextFactory, setPrincipalSuffix, setSearchBase, setSearchFilter, setSystemPassword, setSystemUsername, setUrl

    Methods 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, setRolePermissionResolver

    Methods 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, supports

    Methods inherited from class org.apache.shiro.realm.CachingRealm

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

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.apache.shiro.util.Initializable

    init
  • Constructor Details

    • LdapRealm

      public LdapRealm()
  • Method Details

    • setGroupRequestFilter

      public void setGroupRequestFilter(String groupRequestFilter)
      set the group request filter, defined in shiro.ini
      Parameters:
      groupRequestFilter -
    • setGroupRolesMap

      public void setGroupRolesMap(Map<String,String> groupRolesMap)
      set the map of group role, defined in shiro.ini
      Parameters:
      groupRolesMap -
    • setUserDnTemplate

      public void setUserDnTemplate(String userDnTemplate)
      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:
      queryForAuthenticationInfo in class org.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:
      queryForAuthorizationInfo in class org.apache.shiro.realm.ldap.AbstractLdapRealm
      Throws:
      NamingException