Class OpenNMSLoginModule
- java.lang.Object
-
- org.opennms.web.springframework.security.OpenNMSLoginModule
-
- All Implemented Interfaces:
LoginModule
,LoginHandler
,OpenNMSLoginHandler
public class OpenNMSLoginModule extends Object implements LoginModule, LoginHandler, OpenNMSLoginHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected CallbackHandler
m_callbackHandler
protected Map<String,?>
m_options
protected Set<Principal>
m_principals
protected Map<String,?>
m_sharedState
protected Subject
m_subject
protected String
m_user
-
Constructor Summary
Constructors Constructor Description OpenNMSLoginModule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
abort()
CallbackHandler
callbackHandler()
boolean
commit()
Set<Principal>
createPrincipals(org.springframework.security.core.GrantedAuthority authority)
static SpringSecurityUserDao
getSpringSecurityUserDao()
static UserConfig
getUserConfig()
void
initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
boolean
login()
boolean
logout()
Set<Principal>
principals()
boolean
requiresAdminRole()
void
setPrincipals(Set<Principal> principals)
static void
setSpringSecurityUserDao(SpringSecurityUserDao userDao)
void
setUser(String user)
static void
setUserConfig(UserConfig userConfig)
SpringSecurityUserDao
springSecurityUserDao()
String
user()
UserConfig
userConfig()
-
-
-
Method Detail
-
initialize
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
- Specified by:
initialize
in interfaceLoginModule
-
login
public boolean login() throws LoginException
- Specified by:
login
in interfaceLoginModule
- Throws:
LoginException
-
abort
public boolean abort() throws LoginException
- Specified by:
abort
in interfaceLoginModule
- Throws:
LoginException
-
logout
public boolean logout() throws LoginException
- Specified by:
logout
in interfaceLoginModule
- Throws:
LoginException
-
getUserConfig
public static UserConfig getUserConfig()
-
setUserConfig
public static void setUserConfig(UserConfig userConfig)
-
getSpringSecurityUserDao
public static SpringSecurityUserDao getSpringSecurityUserDao()
-
setSpringSecurityUserDao
public static void setSpringSecurityUserDao(SpringSecurityUserDao userDao)
-
commit
public boolean commit() throws LoginException
- Specified by:
commit
in interfaceLoginModule
- Throws:
LoginException
-
callbackHandler
public CallbackHandler callbackHandler()
- Specified by:
callbackHandler
in interfaceLoginHandler
-
userConfig
public UserConfig userConfig()
- Specified by:
userConfig
in interfaceLoginHandler
-
springSecurityUserDao
public SpringSecurityUserDao springSecurityUserDao()
- Specified by:
springSecurityUserDao
in interfaceLoginHandler
-
user
public String user()
- Specified by:
user
in interfaceLoginHandler
-
setUser
public void setUser(String user)
- Specified by:
setUser
in interfaceLoginHandler
-
createPrincipals
public Set<Principal> createPrincipals(org.springframework.security.core.GrantedAuthority authority)
- Specified by:
createPrincipals
in interfaceLoginHandler
-
principals
public Set<Principal> principals()
- Specified by:
principals
in interfaceLoginHandler
-
setPrincipals
public void setPrincipals(Set<Principal> principals)
- Specified by:
setPrincipals
in interfaceLoginHandler
-
requiresAdminRole
public boolean requiresAdminRole()
- Specified by:
requiresAdminRole
in interfaceOpenNMSLoginHandler
-
-