public class LdapIdentityProviderSession extends Object implements ReadOnlyIdentityProvider
LDAP ReadOnlyIdentityProvider.
| Modifier and Type | Field and Description |
|---|---|
protected LdapContext |
initialContext |
protected LdapConfiguration |
ldapConfiguration |
| Constructor and Description |
|---|
LdapIdentityProviderSession(LdapConfiguration ldapConfiguration) |
protected LdapConfiguration ldapConfiguration
protected LdapContext initialContext
public LdapIdentityProviderSession(LdapConfiguration ldapConfiguration)
protected InitialLdapContext openContext(String userDn, String password)
protected void ensureContextInitialized()
public User findUserById(String userId)
findUserById in interface ReadOnlyIdentityProviderUser object for the given user id or null if no such user exists.public UserQuery createUserQuery()
createUserQuery in interface ReadOnlyIdentityProviderUserQuery object which can be used for querying for users.public UserQueryImpl createUserQuery(CommandContext commandContext)
createUserQuery in interface ReadOnlyIdentityProviderUserQuery object which can be used in the current command contextpublic NativeUserQuery createNativeUserQuery()
ReadOnlyIdentityProviderNativeUserQuery that allows to select users with native queries.createNativeUserQuery in interface ReadOnlyIdentityProviderpublic long findUserCountByQueryCriteria(LdapUserQueryImpl query)
public List<User> findUserByQueryCriteria(LdapUserQueryImpl query)
protected List<User> findUsersByGroupId(LdapUserQueryImpl query)
public List<User> findUsersWithoutGroupId(LdapUserQueryImpl query, String userBaseDn, boolean ignorePagination)
public boolean checkPassword(String userId, String password)
checkPassword in interface ReadOnlyIdentityProviderprotected String getUserSearchFilter(LdapUserQueryImpl query)
public Group findGroupById(String groupId)
findGroupById in interface ReadOnlyIdentityProviderGroup object for the given group id or null if no such group exists.public GroupQuery createGroupQuery()
createGroupQuery in interface ReadOnlyIdentityProviderGroupQuery object which can be used for querying for groups.public GroupQuery createGroupQuery(CommandContext commandContext)
createGroupQuery in interface ReadOnlyIdentityProviderGroupQuery object which can be used for querying for groups and can be reused in the current command context.public long findGroupCountByQueryCriteria(LdapGroupQuery ldapGroupQuery)
public List<Group> findGroupByQueryCriteria(LdapGroupQuery query)
protected String getGroupSearchFilter(LdapGroupQuery query)
protected String getStringAttributeValue(String attrName, Attributes attributes) throws NamingException
NamingExceptionprotected void addFilter(String attributeName, String attributeValue, StringWriter writer)
protected LdapUserEntity transformUser(SearchResult result) throws NamingException
NamingExceptionprotected GroupEntity transformGroup(SearchResult result) throws NamingException
NamingExceptionprotected void applyRequestControls(AbstractQuery<?,?> query)
protected boolean isAuthenticatedUser(UserEntity user)
protected boolean isAuthorized(Permission permission, Resource resource, String resourceId)
public TenantQuery createTenantQuery()
createTenantQuery in interface ReadOnlyIdentityProviderTenantQuery object which can be used for querying for
tenants.public TenantQuery createTenantQuery(CommandContext commandContext)
createTenantQuery in interface ReadOnlyIdentityProviderTenantQuery object which can be used for querying for
tenants and can be reused in the current command context.public Tenant findTenantById(String id)
findTenantById in interface ReadOnlyIdentityProviderTenant object for the given id or null if no such tenant
exists.Copyright © 2022. All rights reserved.