Interface UserManager
- All Superinterfaces:
gemma.gsec.authentication.GroupManager,org.springframework.security.provisioning.GroupManager,gemma.gsec.authentication.UserDetailsManager,org.springframework.security.provisioning.UserDetailsManager,org.springframework.security.core.userdetails.UserDetailsService
- All Known Implementing Classes:
UserManagerImpl
public interface UserManager
extends gemma.gsec.authentication.UserDetailsManager, gemma.gsec.authentication.GroupManager
Overrides gsec's UserManager to provide Gemma-specific types.
- Author:
- poirigui
-
Method Summary
Modifier and TypeMethodDescriptionvoidchangePassword(String oldPassword, String newPassword) changePasswordForUser(String email, String username, String newPassword) gemma.gsec.authentication.UserDetailsImplcreateUser(String username, String email, String password) voidcreateUser(org.springframework.security.core.userdetails.UserDetails user) voiddeleteUser(String username) findGroupsForUser(String username) Obtain theUsercorresponding to the currently logged in user.Obtain the username of the currently logged in user.loadAll()voidupdateUser(org.springframework.security.core.userdetails.UserDetails user) voidupdateUserGroups(org.springframework.security.core.userdetails.UserDetails user, Collection<String> groups) Update the groups a user belong to.booleanuserExists(String username) booleanuserWithEmailExists(String emailAddress) booleanvalidateSignupToken(String username, String key) Methods inherited from interface gemma.gsec.authentication.GroupManager
groupExistsMethods inherited from interface org.springframework.security.provisioning.GroupManager
addGroupAuthority, addUserToGroup, createGroup, deleteGroup, findAllGroups, findGroupAuthorities, findUsersInGroup, removeGroupAuthority, removeUserFromGroup, renameGroupMethods inherited from interface gemma.gsec.authentication.UserDetailsManager
findAllUsers, generateSignupToken, loggedIn, reauthenticateMethods inherited from interface org.springframework.security.core.userdetails.UserDetailsService
loadUserByUsername
-
Method Details
-
findByEmail
@Secured({"GROUP_USER","RUN_AS_ADMIN"}) User findByEmail(String s) throws org.springframework.security.core.userdetails.UsernameNotFoundException - Throws:
org.springframework.security.core.userdetails.UsernameNotFoundException
-
findByUserName
User findByUserName(String s) throws org.springframework.security.core.userdetails.UsernameNotFoundException - Throws:
org.springframework.security.core.userdetails.UsernameNotFoundException
-
findGroupsForUser
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_USER"}) Collection<String> findGroupsForUser(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException - Specified by:
findGroupsForUserin interfacegemma.gsec.authentication.GroupManager- Throws:
org.springframework.security.core.userdetails.UsernameNotFoundException
-
userWithEmailExists
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"}) boolean userWithEmailExists(String emailAddress) - Specified by:
userWithEmailExistsin interfacegemma.gsec.authentication.UserDetailsManager
-
getCurrentUser
Obtain theUsercorresponding to the currently logged in user.- Returns:
- the user, or null if no user is logged in
-
getCurrentUsername
String getCurrentUsername()Obtain the username of the currently logged in user.If no user is logged in, the principal of the anonymous authentication token is returned.
- Specified by:
getCurrentUsernamein interfacegemma.gsec.authentication.UserDetailsManager
-
loadAll
-
userExists
- Specified by:
userExistsin interfaceorg.springframework.security.provisioning.UserDetailsManager
-
createUser
-
createUser
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"}) void createUser(org.springframework.security.core.userdetails.UserDetails user) - Specified by:
createUserin interfaceorg.springframework.security.provisioning.UserDetailsManager
-
updateUser
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"}) void updateUser(org.springframework.security.core.userdetails.UserDetails user) - Specified by:
updateUserin interfaceorg.springframework.security.provisioning.UserDetailsManager
-
updateUserGroups
@Secured("GROUP_ADMIN") void updateUserGroups(org.springframework.security.core.userdetails.UserDetails user, Collection<String> groups) Update the groups a user belong to. -
deleteUser
- Specified by:
deleteUserin interfaceorg.springframework.security.provisioning.UserDetailsManager
-
changePasswordForUser
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"}) String changePasswordForUser(String email, String username, String newPassword) - Specified by:
changePasswordForUserin interfacegemma.gsec.authentication.UserDetailsManager
-
changePassword
- Specified by:
changePasswordin interfaceorg.springframework.security.provisioning.UserDetailsManager
-
validateSignupToken
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"}) boolean validateSignupToken(String username, String key) - Specified by:
validateSignupTokenin interfacegemma.gsec.authentication.UserDetailsManager
-