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 ReadOnlyIdentityProvider
User
object for the given user id or null if no such user exists.public UserQuery createUserQuery()
createUserQuery
in interface ReadOnlyIdentityProvider
UserQuery
object which can be used for querying for users.public UserQueryImpl createUserQuery(CommandContext commandContext)
createUserQuery
in interface ReadOnlyIdentityProvider
UserQuery
object which can be used in the current command contextpublic NativeUserQuery createNativeUserQuery()
ReadOnlyIdentityProvider
NativeUserQuery
that allows to select users with native queries.createNativeUserQuery
in interface ReadOnlyIdentityProvider
public 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 ReadOnlyIdentityProvider
protected String getUserSearchFilter(LdapUserQueryImpl query)
public Group findGroupById(String groupId)
findGroupById
in interface ReadOnlyIdentityProvider
Group
object for the given group id or null if no such group exists.public GroupQuery createGroupQuery()
createGroupQuery
in interface ReadOnlyIdentityProvider
GroupQuery
object which can be used for querying for groups.public GroupQuery createGroupQuery(CommandContext commandContext)
createGroupQuery
in interface ReadOnlyIdentityProvider
GroupQuery
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
NamingException
protected void addFilter(String attributeName, String attributeValue, StringWriter writer)
protected LdapUserEntity transformUser(SearchResult result) throws NamingException
NamingException
protected GroupEntity transformGroup(SearchResult result) throws NamingException
NamingException
protected void applyRequestControls(AbstractQuery<?,?> query)
protected boolean isAuthenticatedUser(UserEntity user)
protected boolean isAuthorized(Permission permission, Resource resource, String resourceId)
public TenantQuery createTenantQuery()
createTenantQuery
in interface ReadOnlyIdentityProvider
TenantQuery
object which can be used for querying for
tenants.public TenantQuery createTenantQuery(CommandContext commandContext)
createTenantQuery
in interface ReadOnlyIdentityProvider
TenantQuery
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 ReadOnlyIdentityProvider
Tenant
object for the given id or null if no such tenant
exists.Copyright © 2019. All rights reserved.