All Downloads are FREE. Search and download functionalities are using the official Maven repository.

security.UserSpringFramework Maven / Gradle / Ivy

The newest version!
package security;

import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;

import com.github.jhonyscamacho.finaluser.domain.User;


/**
 * This class represents a user on the system. It is responsible for storing the
 * instance of a registered user in the system and can provide basic information
 * such as: user name, user email, among others.
 * 
 * @author Jhonys Camacho
 */
public class UserSpringFramework extends org.springframework.security.core.userdetails.User {
	private static final long serialVersionUID = 9035562524982034927L;
	
	private User user;
	
	/*
	 * To obtain the instance of a user just pass the login, password and
	 * function groups that the user has.
	 */
	public UserSpringFramework(User user, Collection roleGroups) {
		super(user.getEmail(),user.getPassword(), roleGroups);
		this.user = user;
	}

	public User getUser() {
		return this.user;
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy