Token response

This commit is contained in:
Filip Izydorczyk
2020-12-07 21:39:47 +01:00
parent b412ee2a5b
commit 3061fb1edf
2 changed files with 103 additions and 0 deletions

View File

@ -0,0 +1,34 @@
package com.plannaplan.responses.models;
import com.plannaplan.entities.User;
public class TokenResponse {
private String token;
private Long id;
private String authorityRole;
private String email;
public TokenResponse(User user) {
this.id = user.getId();
this.authorityRole = user.getRole().toString();
this.email = user.getEmail();
this.token = user.getToken();
}
public String getEmail() {
return email;
}
public String getAuthorityRole() {
return authorityRole;
}
public Long getId() {
return id;
}
public String getToken() {
return token;
}
}