edu.asu.diging.gilesecosystem.util.users.IAdminUserDetailsService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of giles-eco-util Show documentation
Show all versions of giles-eco-util Show documentation
Utility plugin for the Giles Ecoystem that for example provides utility classes
for properties or file management.
The newest version!
package edu.asu.diging.gilesecosystem.util.users;
import java.util.List;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
public interface IAdminUserDetailsService extends UserDetailsService {
public abstract UserDetails loadUserByUsername(String arg0)
throws UsernameNotFoundException;
/**
* Return all stored admin users.
* @return list of all admin users
*/
public abstract List getAllAdmins();
/**
* Change the password of a user. This method will generate a BCrypt hash
* for a given plaintext password and will store the hashed password.
* @param username Username of the user whose password should be changed.
* @param password New password in plain text.
* @return true if change was successful, otherwise false.
*/
public abstract boolean changePassword(String username, String password, String role);
public abstract boolean isPasswordValid(String username, String password);
}