package com.astalange.core.security;

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

public class CustomUserDetails extends User {
    private final Long id;
    private final boolean mustChangePassword;

    public CustomUserDetails(Long id, String username, String password, boolean enabled, boolean mustChangePassword,
                             Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, true, true, true, authorities);
        this.id = id;
        this.mustChangePassword = mustChangePassword;
    }

    public Long getId() {
        return id;
    }

    public boolean isMustChangePassword() {
        return mustChangePassword;
    }
}
