org.hippoecm.hst.security.impl
Class HippoAuthenticationProvider

java.lang.Object
  extended by org.hippoecm.hst.security.impl.JcrAuthenticationProvider
      extended by org.hippoecm.hst.security.impl.HippoAuthenticationProvider
All Implemented Interfaces:
AuthenticationProvider

public class HippoAuthenticationProvider
extends JcrAuthenticationProvider

HippoAuthenticationProvider

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.

Version:
$Id$

Field Summary
static String DEFAULT_GROUPS_OF_USER_QUERY
           
static String DEFAULT_ROLES_OF_USER_AND_GROUP_QUERY
           
 
Fields inherited from class org.hippoecm.hst.security.impl.JcrAuthenticationProvider
DEFAULT_ROLES_OF_USER_QUERY
 
Constructor Summary
HippoAuthenticationProvider(javax.jcr.Repository systemRepository, javax.jcr.Credentials systemCreds, javax.jcr.Repository userAuthRepository)
           
 
Method Summary
 String getGroupsOfUserQuery()
           
 String getRoleDomainName()
           
protected  Set<String> getRoleNamesOfUser(String username)
           
 String getRolesOfUserAndGroupQuery()
           
 void setGroupsOfUserQuery(String groupsOfUserQuery)
           
 void setRoleDomainName(String roleDomainName)
           
 void setRolesOfUserAndGroupQuery(String rolesOfUserAndGroupQuery)
           
 
Methods inherited from class org.hippoecm.hst.security.impl.JcrAuthenticationProvider
authenticate, getDefaultRoleName, getQueryLanguage, getRolesByUsername, getRolesOfUserQuery, getSystemCredentials, getSystemRepository, getUserAuthRepository, setDefaultRoleName, setQueryLanguage, setRolesOfUserQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_GROUPS_OF_USER_QUERY

public static final String DEFAULT_GROUPS_OF_USER_QUERY
See Also:
Constant Field Values

DEFAULT_ROLES_OF_USER_AND_GROUP_QUERY

public static final String DEFAULT_ROLES_OF_USER_AND_GROUP_QUERY
See Also:
Constant Field Values
Constructor Detail

HippoAuthenticationProvider

public HippoAuthenticationProvider(javax.jcr.Repository systemRepository,
                                   javax.jcr.Credentials systemCreds,
                                   javax.jcr.Repository userAuthRepository)
Method Detail

setGroupsOfUserQuery

public void setGroupsOfUserQuery(String groupsOfUserQuery)

getGroupsOfUserQuery

public String getGroupsOfUserQuery()

setRoleDomainName

public void setRoleDomainName(String roleDomainName)

getRoleDomainName

public String getRoleDomainName()

setRolesOfUserAndGroupQuery

public void setRolesOfUserAndGroupQuery(String rolesOfUserAndGroupQuery)

getRolesOfUserAndGroupQuery

public String getRolesOfUserAndGroupQuery()

getRoleNamesOfUser

protected Set<String> getRoleNamesOfUser(String username)
                                  throws javax.jcr.LoginException,
                                         javax.jcr.RepositoryException
Overrides:
getRoleNamesOfUser in class JcrAuthenticationProvider
Throws:
javax.jcr.LoginException
javax.jcr.RepositoryException


Copyright © 2008-2012 Hippo. All Rights Reserved.