Interface UserManager

  • All Superinterfaces:
    org.springframework.security.provisioning.GroupManager, org.springframework.security.provisioning.UserDetailsManager, org.springframework.security.core.userdetails.UserDetailsService, gemma.gsec.authentication.UserManager
    All Known Implementing Classes:
    UserManagerImpl

    public interface UserManager
    extends gemma.gsec.authentication.UserManager
    Overrides gsec's UserManager to provide Gemma-specific types.
    Author:
    poirigui
    • Method Detail

      • findByEmail

        @Secured({"GROUP_USER","RUN_AS_ADMIN"})
        User findByEmail​(String s)
                  throws org.springframework.security.core.userdetails.UsernameNotFoundException
        Specified by:
        findByEmail in interface gemma.gsec.authentication.UserManager
        Throws:
        org.springframework.security.core.userdetails.UsernameNotFoundException
      • findbyEmail

        @Secured({"GROUP_USER","RUN_AS_ADMIN"})
        gemma.gsec.model.User findbyEmail​(String emailAddress)
        Specified by:
        findbyEmail in interface gemma.gsec.authentication.UserManager
      • findByUserName

        User findByUserName​(String s)
                     throws org.springframework.security.core.userdetails.UsernameNotFoundException
        Specified by:
        findByUserName in interface gemma.gsec.authentication.UserManager
        Throws:
        org.springframework.security.core.userdetails.UsernameNotFoundException
      • findGroupByName

        UserGroup findGroupByName​(String s)
        Specified by:
        findGroupByName in interface gemma.gsec.authentication.UserManager
      • findGroupsForUser

        @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_USER"})
        Collection<String> findGroupsForUser​(String username)
                                      throws org.springframework.security.core.userdetails.UsernameNotFoundException
        Specified by:
        findGroupsForUser in interface gemma.gsec.authentication.UserManager
        Throws:
        org.springframework.security.core.userdetails.UsernameNotFoundException
      • userWithEmailExists

        @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"})
        boolean userWithEmailExists​(String emailAddress)
        Specified by:
        userWithEmailExists in interface gemma.gsec.authentication.UserManager
      • getCurrentUser

        User getCurrentUser()
        Specified by:
        getCurrentUser in interface gemma.gsec.authentication.UserManager
      • loadAll

        @Secured("GROUP_ADMIN")
        Collection<User> loadAll()
        Specified by:
        loadAll in interface gemma.gsec.authentication.UserManager
      • userExists

        @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"})
        boolean userExists​(String username)
        Specified by:
        userExists in interface org.springframework.security.provisioning.UserDetailsManager
      • createUser

        @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"})
        void createUser​(org.springframework.security.core.userdetails.UserDetails user)
        Specified by:
        createUser in interface org.springframework.security.provisioning.UserDetailsManager
      • updateUser

        @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"})
        void updateUser​(org.springframework.security.core.userdetails.UserDetails user)
        Specified by:
        updateUser in interface org.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

        @Secured("GROUP_ADMIN")
        void deleteUser​(String username)
        Specified by:
        deleteUser in interface org.springframework.security.provisioning.UserDetailsManager
      • changePasswordForUser

        @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"})
        String changePasswordForUser​(String email,
                                     String username,
                                     String newPassword)
        Specified by:
        changePasswordForUser in interface gemma.gsec.authentication.UserManager
      • changePassword

        @Secured("GROUP_USER")
        void changePassword​(String oldPassword,
                            String newPassword)
        Specified by:
        changePassword in interface org.springframework.security.provisioning.UserDetailsManager
      • validateSignupToken

        @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","RUN_AS_ADMIN"})
        boolean validateSignupToken​(String username,
                                    String key)
        Specified by:
        validateSignupToken in interface gemma.gsec.authentication.UserManager