Class LDAPCache
- java.lang.Object
-
- org.apache.karaf.jaas.modules.ldap.LDAPCache
-
- All Implemented Interfaces:
Closeable,AutoCloseable,EventListener,NamespaceChangeListener,NamingListener,ObjectChangeListener
public class LDAPCache extends Object implements Closeable, NamespaceChangeListener, ObjectChangeListener
-
-
Constructor Summary
Constructors Constructor Description LDAPCache(LDAPOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidclear()protected voidclearCache()voidclose()protected String[]doGetUserDnAndNamespace(String user)static LDAPCachegetCache(LDAPOptions options)String[]getUserDnAndNamespace(String user)String[]getUserPubkeys(String userDn)String[]getUserRoles(String user, String userDn, String userDnNamespace)voidnamingExceptionThrown(NamingExceptionEvent evt)voidobjectAdded(NamingEvent evt)voidobjectChanged(NamingEvent evt)voidobjectRemoved(NamingEvent evt)voidobjectRenamed(NamingEvent evt)DirContextopen()protected Set<String>tryMappingRole(String role)
-
-
-
Constructor Detail
-
LDAPCache
public LDAPCache(LDAPOptions options)
-
-
Method Detail
-
clear
public static void clear()
-
getCache
public static LDAPCache getCache(LDAPOptions options)
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
open
public DirContext open() throws NamingException
- Throws:
NamingException
-
getUserDnAndNamespace
public String[] getUserDnAndNamespace(String user) throws Exception
- Throws:
Exception
-
doGetUserDnAndNamespace
protected String[] doGetUserDnAndNamespace(String user) throws NamingException
- Throws:
NamingException
-
getUserRoles
public String[] getUserRoles(String user, String userDn, String userDnNamespace) throws Exception
- Throws:
Exception
-
getUserPubkeys
public String[] getUserPubkeys(String userDn) throws NamingException
- Throws:
NamingException
-
objectAdded
public void objectAdded(NamingEvent evt)
- Specified by:
objectAddedin interfaceNamespaceChangeListener
-
objectRemoved
public void objectRemoved(NamingEvent evt)
- Specified by:
objectRemovedin interfaceNamespaceChangeListener
-
objectRenamed
public void objectRenamed(NamingEvent evt)
- Specified by:
objectRenamedin interfaceNamespaceChangeListener
-
objectChanged
public void objectChanged(NamingEvent evt)
- Specified by:
objectChangedin interfaceObjectChangeListener
-
namingExceptionThrown
public void namingExceptionThrown(NamingExceptionEvent evt)
- Specified by:
namingExceptionThrownin interfaceNamingListener
-
clearCache
protected void clearCache()
-
-