package <%=packageName%>.security;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

public class MyUserDetails extends User {
    private <%= userIdType %> id;

    public MyUserDetails(String username, String password, Collection<? extends GrantedAuthority> authorities, <%= userIdType %> id) {
        super(username, password, authorities);
        this.id = id;
    }

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

    public <%= userIdType %> getId() {
        return id;
    }
}
