BusinessLayer.model.CustomSecurityUser.java Source code

Java tutorial

Introduction

Here is the source code for BusinessLayer.model.CustomSecurityUser.java

Source

/*
 * 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 BusinessLayer.model;

import java.util.Collection;
import org.springframework.security.core.GrantedAuthority;

/**
 *
 * @author MiChiamoG.A
 */
public class CustomSecurityUser extends org.springframework.security.core.userdetails.User {

    public Integer id;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public CustomSecurityUser(String username, String password,
            Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }

    public CustomSecurityUser(String username, String password, boolean enabled, boolean accountNonExpired,
            boolean credentialsNonExpired, boolean accountNonLocked,
            Collection<? extends GrantedAuthority> authorities, Integer id) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
        this.id = id;
    }

}