Class SpringSecurityUserDaoImpl
- java.lang.Object
-
- org.opennms.web.springframework.security.SpringSecurityUserDaoImpl
-
- All Implemented Interfaces:
SpringSecurityUserDao,org.springframework.beans.factory.InitializingBean
public class SpringSecurityUserDaoImpl extends 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 voidafterPropertiesSet()protected Collection<? extends org.springframework.security.core.GrantedAuthority>getAuthoritiesByUsername(String username)Gets the authorities by username.protected org.springframework.security.core.GrantedAuthoritygetAuthority(String role)Gets the authority.SpringSecurityUsergetByUsername(String username)getByUsernameUserManagergetUserManager()Gets the user manager.StringgetUsersConfigurationFile()Gets the users configuration file.longgetUsersLastModified()Gets the users last modified.voidsetUserManager(UserManager mgr)Sets the user manager.voidsetUsersConfigurationFile(String usersConfigurationFile)Sets the users configuration file.
-
-
-
Method Detail
-
getAuthority
protected org.springframework.security.core.GrantedAuthority getAuthority(String role)
Gets the authority.- Parameters:
role- the role- Returns:
- the authority
-
getAuthoritiesByUsername
protected Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthoritiesByUsername(String username)
Gets the authorities by username.- Parameters:
username- the username- Returns:
- the authorities by username
-
setUsersConfigurationFile
public void setUsersConfigurationFile(String usersConfigurationFile)
Sets the users configuration file.- Parameters:
usersConfigurationFile- the new users configuration file
-
getUsersConfigurationFile
public String getUsersConfigurationFile()
Gets the users configuration file.- Returns:
- the users configuration file
-
getByUsername
public SpringSecurityUser getByUsername(String username)
Description copied from interface:SpringSecurityUserDaogetByUsername
- Specified by:
getByUsernamein interfaceSpringSecurityUserDao- Parameters:
username- aStringobject.- Returns:
- a
OnmsUserobject.
-
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:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
-