@Transactional @Service public class UserManagerImpl extends Object implements UserManager
Constructor and Description |
---|
UserManagerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addGroupAuthority(String groupName,
org.springframework.security.core.GrantedAuthority authority) |
void |
addUserToGroup(String username,
String groupName) |
void |
changePassword(String oldPassword,
String newPassword) |
String |
changePasswordForUser(String email,
String username,
String newPassword) |
void |
createGroup(String groupName,
List<org.springframework.security.core.GrantedAuthority> authorities) |
void |
createUser(org.springframework.security.core.userdetails.UserDetails user) |
void |
deleteGroup(String groupName) |
void |
deleteUser(String username) |
List<String> |
findAllGroups() |
Collection<String> |
findAllUsers() |
User |
findbyEmail(String emailAddress) |
User |
findByEmail(String emailAddress) |
User |
findByUserName(String userName) |
List<org.springframework.security.core.GrantedAuthority> |
findGroupAuthorities(String groupName) |
UserGroup |
findGroupByName(String name) |
Collection<String> |
findGroupsForUser(String userName) |
List<String> |
findUsersInGroup(String groupName) |
String |
generateSignupToken(String username) |
User |
getCurrentUser() |
String |
getCurrentUsername() |
String |
getRolePrefix() |
boolean |
groupExists(String groupName) |
boolean |
isEnableAuthorities() |
boolean |
isEnableGroups() |
Collection<User> |
loadAll() |
org.springframework.security.core.userdetails.UserDetails |
loadUserByUsername(String username) |
protected List<org.springframework.security.core.userdetails.UserDetails> |
loadUsersByUsername(String username) |
boolean |
loggedIn() |
void |
reauthenticate(String username,
String password) |
void |
removeGroupAuthority(String groupName,
org.springframework.security.core.GrantedAuthority authority) |
void |
removeUserFromGroup(String username,
String groupName) |
void |
renameGroup(String oldName,
String newName) |
void |
setEnableAuthorities(boolean enableAuthorities) |
void |
setEnableGroups(boolean enableGroups) |
void |
setRolePrefix(String rolePrefix) |
void |
updateUser(org.springframework.security.core.userdetails.UserDetails user) |
boolean |
userExists(String username) |
boolean |
userWithEmailExists(String emailAddress) |
boolean |
validateSignupToken(String username,
String key) |
@Secured(value={"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"}) @Transactional public String changePasswordForUser(String email, String username, String newPassword) throws org.springframework.security.core.AuthenticationException
changePasswordForUser
in interface gemma.gsec.authentication.UserManager
org.springframework.security.core.AuthenticationException
public Collection<String> findAllUsers()
findAllUsers
in interface gemma.gsec.authentication.UserManager
@Secured(value={"GROUP_USER","RUN_AS_ADMIN"}) public User findbyEmail(String emailAddress)
findbyEmail
in interface gemma.gsec.authentication.UserManager
@Secured(value={"GROUP_USER","RUN_AS_ADMIN"}) public User findByEmail(String emailAddress)
findByEmail
in interface gemma.gsec.authentication.UserManager
public User findByUserName(String userName)
findByUserName
in interface gemma.gsec.authentication.UserManager
public UserGroup findGroupByName(String name)
findGroupByName
in interface gemma.gsec.authentication.UserManager
@Secured(value={"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_USER"}) public Collection<String> findGroupsForUser(String userName)
findGroupsForUser
in interface gemma.gsec.authentication.UserManager
public String generateSignupToken(String username)
generateSignupToken
in interface gemma.gsec.authentication.UserManager
public User getCurrentUser()
getCurrentUser
in interface gemma.gsec.authentication.UserManager
public String getCurrentUsername()
getCurrentUsername
in interface gemma.gsec.authentication.UserManager
public String getRolePrefix()
getRolePrefix
in interface gemma.gsec.authentication.UserManager
public void setRolePrefix(String rolePrefix)
public boolean groupExists(String groupName)
groupExists
in interface gemma.gsec.authentication.UserManager
public Collection<User> loadAll()
loadAll
in interface gemma.gsec.authentication.UserManager
public boolean loggedIn()
loggedIn
in interface gemma.gsec.authentication.UserManager
public void reauthenticate(String username, String password)
reauthenticate
in interface gemma.gsec.authentication.UserManager
@Secured(value={"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"}) public boolean userWithEmailExists(String emailAddress)
userWithEmailExists
in interface gemma.gsec.authentication.UserManager
@Secured(value={"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"}) public boolean validateSignupToken(String username, String key)
validateSignupToken
in interface gemma.gsec.authentication.UserManager
@Secured(value={"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"}) @Transactional public void createUser(org.springframework.security.core.userdetails.UserDetails user)
createUser
in interface org.springframework.security.provisioning.UserDetailsManager
@Secured(value={"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"}) @Transactional public void updateUser(org.springframework.security.core.userdetails.UserDetails user)
updateUser
in interface org.springframework.security.provisioning.UserDetailsManager
@Transactional public void deleteUser(String username)
deleteUser
in interface org.springframework.security.provisioning.UserDetailsManager
@Secured(value="GROUP_USER") @Transactional public void changePassword(String oldPassword, String newPassword) throws org.springframework.security.core.AuthenticationException
changePassword
in interface org.springframework.security.provisioning.UserDetailsManager
org.springframework.security.core.AuthenticationException
@Secured(value={"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"}) public boolean userExists(String username)
userExists
in interface org.springframework.security.provisioning.UserDetailsManager
public List<String> findAllGroups()
findAllGroups
in interface org.springframework.security.provisioning.GroupManager
public List<String> findUsersInGroup(String groupName)
findUsersInGroup
in interface org.springframework.security.provisioning.GroupManager
public void createGroup(String groupName, List<org.springframework.security.core.GrantedAuthority> authorities)
createGroup
in interface org.springframework.security.provisioning.GroupManager
public void deleteGroup(String groupName)
deleteGroup
in interface org.springframework.security.provisioning.GroupManager
public void renameGroup(String oldName, String newName)
renameGroup
in interface org.springframework.security.provisioning.GroupManager
public void addUserToGroup(String username, String groupName)
addUserToGroup
in interface org.springframework.security.provisioning.GroupManager
public void removeUserFromGroup(String username, String groupName)
removeUserFromGroup
in interface org.springframework.security.provisioning.GroupManager
public List<org.springframework.security.core.GrantedAuthority> findGroupAuthorities(String groupName)
findGroupAuthorities
in interface org.springframework.security.provisioning.GroupManager
public void addGroupAuthority(String groupName, org.springframework.security.core.GrantedAuthority authority)
addGroupAuthority
in interface org.springframework.security.provisioning.GroupManager
public void removeGroupAuthority(String groupName, org.springframework.security.core.GrantedAuthority authority)
removeGroupAuthority
in interface org.springframework.security.provisioning.GroupManager
public boolean isEnableAuthorities()
public void setEnableAuthorities(boolean enableAuthorities)
public boolean isEnableGroups()
public void setEnableGroups(boolean enableGroups)
public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException, DataAccessException
loadUserByUsername
in interface org.springframework.security.core.userdetails.UserDetailsService
org.springframework.security.core.userdetails.UsernameNotFoundException
DataAccessException
Copyright © 2005–2023 Pavlidis lab, Michael Smith Laboratories and Department of Psychiatry, University of British Columbia. All rights reserved.