public class JcrAuthenticationProvider extends Object implements AuthenticationProvider
Basic authentication provider implementation which queries role nodes by the specified rolesOfUserQuery
.
The default configuration is to query group nodes from the Hippo Repository.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ROLES_OF_USER_QUERY |
Constructor and Description |
---|
JcrAuthenticationProvider(javax.jcr.Repository systemRepository,
javax.jcr.Credentials systemCreds,
javax.jcr.Repository userAuthRepository) |
Modifier and Type | Method and Description |
---|---|
User |
authenticate(String userName,
char[] password) |
String |
getDefaultRoleName() |
String |
getQueryLanguage() |
protected Set<String> |
getRoleNamesOfUser(String username) |
Set<Role> |
getRolesByUsername(String username) |
String |
getRolesOfUserQuery() |
javax.jcr.Credentials |
getSystemCredentials() |
javax.jcr.Repository |
getSystemRepository() |
javax.jcr.Repository |
getUserAuthRepository() |
void |
setDefaultRoleName(String defaultRoleName) |
void |
setQueryLanguage(String queryLanguage) |
void |
setRolesOfUserQuery(String rolesOfUserQuery) |
public static final String DEFAULT_ROLES_OF_USER_QUERY
public JcrAuthenticationProvider(javax.jcr.Repository systemRepository, javax.jcr.Credentials systemCreds, javax.jcr.Repository userAuthRepository)
public javax.jcr.Repository getSystemRepository()
public javax.jcr.Credentials getSystemCredentials()
public javax.jcr.Repository getUserAuthRepository()
public void setRolesOfUserQuery(String rolesOfUserQuery)
public String getRolesOfUserQuery()
public void setQueryLanguage(String queryLanguage)
public String getQueryLanguage()
public void setDefaultRoleName(String defaultRoleName)
public String getDefaultRoleName()
public User authenticate(String userName, char[] password) throws SecurityException
authenticate
in interface AuthenticationProvider
SecurityException
public Set<Role> getRolesByUsername(String username) throws SecurityException
getRolesByUsername
in interface AuthenticationProvider
SecurityException
Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.