16 lines
351 B
Java
16 lines
351 B
Java
package com.example.mtusi_messenger.model;
|
|
|
|
import java.time.Instant;
|
|
import java.util.UUID;
|
|
|
|
public record Session(UUID id, UUID userId, byte[] tokenHash, Instant createdAt, Instant expiresAt) {
|
|
public Session {
|
|
tokenHash = tokenHash.clone();
|
|
}
|
|
|
|
@Override
|
|
public byte[] tokenHash() {
|
|
return tokenHash.clone();
|
|
}
|
|
}
|