View Javadoc
1   package fr.tiogars.domaintemplate.domains.auth.models;
2   
3   import java.time.Instant;
4   
5   import fr.tiogars.domaintemplate.domains.auth.user.entities.User;
6   import io.swagger.v3.oas.annotations.media.Schema;
7   import jakarta.validation.constraints.NotNull;
8   
9   /** JWT response returned after successful authentication. */
10  public record LoginResponse(
11          @Schema(description = "JWT access token.") @NotNull String token,
12          @Schema(description = "Token type.", example = "Bearer") @NotNull String tokenType,
13          @Schema(description = "Token expiration timestamp.") @NotNull Instant expiresAt,
14          @Schema(description = "Authenticated user.") @NotNull User user) {
15  }