fr.smallcrew.security.web.AuthenticatedUser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smallcrew-security Show documentation
Show all versions of smallcrew-security Show documentation
Foundation of all smallcrew's projects needing authenticated users and role management
The newest version!
package fr.smallcrew.security.web;
import fr.smallcrew.security.domain.DomainUser;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;
import java.util.List;
public class AuthenticatedUser extends User {
private static final long serialVersionUID = -2156409486711657118L;
private final DomainUser user;
public AuthenticatedUser(DomainUser user, List authorities) {
super(user.getUsername(), user.getPassword(), authorities);
this.user = user;
}
public String getPasswordSalt() {
return user.getPasswordSalt();
}
public DomainUser getUser() {
return user;
}
}