public class HippoAuthenticationProvider extends JcrAuthenticationProvider
Hippo Repository based authentication provider implementation
which queries hipposys:authrole
nodes by the specified rolesOfUserAndGroupQuery
.
So, it queries the groups of user first by the specified groupsOfUserQuery
.
Also, by default, the hipposys:authrole
nodes are retrieved from the everywhere
domain.
You can change the domain name by setting roleDomainName
property though.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_GROUPS_OF_USER_QUERY |
static String |
DEFAULT_ROLES_OF_USER_AND_GROUP_QUERY |
DEFAULT_ROLES_OF_USER_QUERY
Constructor and Description |
---|
HippoAuthenticationProvider(javax.jcr.Repository systemRepository,
javax.jcr.Credentials systemCreds,
javax.jcr.Repository userAuthRepository) |
Modifier and Type | Method and Description |
---|---|
String |
getGroupsOfUserQuery() |
String |
getRoleDomainName() |
protected Set<String> |
getRoleNamesOfUser(String username) |
String |
getRolesOfUserAndGroupQuery() |
void |
setGroupsOfUserQuery(String groupsOfUserQuery) |
void |
setRoleDomainName(String roleDomainName) |
void |
setRolesOfUserAndGroupQuery(String rolesOfUserAndGroupQuery) |
authenticate, getDefaultRoleName, getQueryLanguage, getRolesByUsername, getRolesOfUserQuery, getSystemCredentials, getSystemRepository, getUserAuthRepository, setDefaultRoleName, setQueryLanguage, setRolesOfUserQuery
public static final String DEFAULT_GROUPS_OF_USER_QUERY
public static final String DEFAULT_ROLES_OF_USER_AND_GROUP_QUERY
public HippoAuthenticationProvider(javax.jcr.Repository systemRepository, javax.jcr.Credentials systemCreds, javax.jcr.Repository userAuthRepository)
public void setGroupsOfUserQuery(String groupsOfUserQuery)
public String getGroupsOfUserQuery()
public void setRoleDomainName(String roleDomainName)
public String getRoleDomainName()
public void setRolesOfUserAndGroupQuery(String rolesOfUserAndGroupQuery)
public String getRolesOfUserAndGroupQuery()
protected Set<String> getRoleNamesOfUser(String username) throws javax.jcr.LoginException, javax.jcr.RepositoryException
getRoleNamesOfUser
in class JcrAuthenticationProvider
javax.jcr.LoginException
javax.jcr.RepositoryException
Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.