Package it.univr.passportease.entity
Class Worker
java.lang.Object
it.univr.passportease.entity.Worker
- All Implemented Interfaces:
UserType
The
Worker
class is an entity that represents a worker. The worker is
the person who is responsible for the management of the offices.-
Field Summary
Modifier and TypeFieldDescriptionprivate Date
private @NonNull String
The email of theWorker
.private @NonNull String
The hash password of theWorker
.private UUID
The id of theWorker
.private @NonNull Office
The office of theWorker
.private @NonNull String
The refresh token of theWorker
.private Date
private @NonNull String
The username of theWorker
. -
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface it.univr.passportease.helper.UserType
getEmail, getHashPassword, getRefreshToken, setEmail, setHashPassword, setRefreshToken
-
Field Details
-
id
The id of theWorker
. -
username
The username of theWorker
. -
email
The email of theWorker
. -
hashPassword
The hash password of theWorker
. Known issue: The password is not salted or peppered. -
refreshToken
The refresh token of theWorker
. Known issue: The refresh token is stored in plain text, and if the database is compromised, the attacker can impersonate the worker. -
office
The office of theWorker
. -
createdAt
-
updatedAt
-
-
Constructor Details
-
Worker
public Worker()
-
-
Method Details