Class SpringSecurityUserDaoImpl
- java.lang.Object
-
- org.opennms.web.springframework.security.SpringSecurityUserDaoImpl
-
- All Implemented Interfaces:
SpringSecurityUserDao
,org.springframework.beans.factory.InitializingBean
public class SpringSecurityUserDaoImpl extends java.lang.Object implements SpringSecurityUserDao, org.springframework.beans.factory.InitializingBean
Implements the interface to allow the servlet container to check our users.xml file to authenticate users.- Author:
- Lawrence Karnowski, Eric Molitor, Alejandro Galue
-
-
Field Summary
-
Fields inherited from interface org.opennms.web.springframework.security.SpringSecurityUserDao
ROLE_USER
-
-
Constructor Summary
Constructors Constructor Description SpringSecurityUserDaoImpl()
Instantiates a new spring security user DAO implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
protected java.util.Collection<? extends org.springframework.security.core.GrantedAuthority>
getAuthoritiesByUsername(java.lang.String username)
Gets the authorities by username.protected org.springframework.security.core.GrantedAuthority
getAuthority(java.lang.String role)
Gets the authority.SpringSecurityUser
getByUsername(java.lang.String username)
getByUsernameUserManager
getUserManager()
Gets the user manager.java.lang.String
getUsersConfigurationFile()
Gets the users configuration file.long
getUsersLastModified()
Gets the users last modified.void
setUserManager(UserManager mgr)
Sets the user manager.void
setUsersConfigurationFile(java.lang.String usersConfigurationFile)
Sets the users configuration file.
-
-
-
Method Detail
-
getAuthority
protected org.springframework.security.core.GrantedAuthority getAuthority(java.lang.String role)
Gets the authority.- Parameters:
role
- the role- Returns:
- the authority
-
getAuthoritiesByUsername
protected java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthoritiesByUsername(java.lang.String username)
Gets the authorities by username.- Parameters:
username
- the username- Returns:
- the authorities by username
-
setUsersConfigurationFile
public void setUsersConfigurationFile(java.lang.String usersConfigurationFile)
Sets the users configuration file.- Parameters:
usersConfigurationFile
- the new users configuration file
-
getUsersConfigurationFile
public java.lang.String getUsersConfigurationFile()
Gets the users configuration file.- Returns:
- the users configuration file
-
getByUsername
public SpringSecurityUser getByUsername(java.lang.String username)
Description copied from interface:SpringSecurityUserDao
getByUsername
- Specified by:
getByUsername
in interfaceSpringSecurityUserDao
- Parameters:
username
- aString
object.- Returns:
- a
OnmsUser
object.
-
getUsersLastModified
public long getUsersLastModified()
Gets the users last modified.- Returns:
- the users last modified
-
getUserManager
public UserManager getUserManager()
Gets the user manager.- Returns:
- the user manager
-
setUserManager
public void setUserManager(UserManager mgr)
Sets the user manager.- Parameters:
mgr
- the new user manager
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
-