package <%=packageName%>.security;

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

import java.util.*;

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

    public MyUserDetails(String username, String password, Collection<? extends GrantedAuthority> authorities, <%= userIdTypeName %> 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, <%= userIdTypeName %> id) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
        this.id = id;
    }

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