/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package security;

import entity.AdminEditor;
import java.security.Principal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 *
 * @author install1
 */
public class UserPrincipal implements Principal {

    private String username;

    /* Create a UserPrincipal, given the Entity class User*/
    public UserPrincipal(AdminEditor admin) {
        this.username = admin.getUserName();
    }

    public UserPrincipal(String username) {
        super();
        this.username = username;
    }

    @Override
    public String getName() {
        return username;
    }

}
