package org.superdev.coddy.user.data;

import java.security.Principal;
import java.util.Date;
import java.util.List;

public class JWTPrincipal implements Principal, IUser {

    private final String login;
    private final String firstName;
    private final String lastName;
    private final List<String> permissions;
    private final Date beginActivationSession;

    public JWTPrincipal(
            final String login,
            final String firstName,
            final String lastName,
            final List<String> permissions,
            final Date beginActivationSession) {
        this.login = login;
        this.firstName = firstName;
        this.lastName = lastName;
        this.permissions = permissions;
        this.beginActivationSession = beginActivationSession != null ? (Date) beginActivationSession.clone() : null;
    }

    @Override
    public String getLogin() {
        return login;
    }

    @Override
    public String getName() {
        return this.firstName + " " + this.lastName;
    }

    public String getFirstName() {
        return firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public List<String> getPermissions() {
        return this.permissions;
    }

    public Date getBeginActivationSession() {
        return this.beginActivationSession != null ? (Date) this.beginActivationSession.clone() : null;
    }
}

@@ -1016,32 +1016,46 @@
 astName;%0A    %7D%0A%0A
+    @Override%0A
     public Strin
@@ -1065,32 +1065,32 @@
 etFirstName() %7B%0A
-
         return f
@@ -1098,32 +1098,46 @@
 rstName;%0A    %7D%0A%0A
+    @Override%0A
     public Strin
@@ -1178,32 +1178,46 @@
 astName;%0A    %7D%0A%0A
+    @Override%0A
     public List%3C

add override annotations