dto/AuthResponseDTO.java

spring-boot-jwt · src/main/java/murraco/dto/AuthResponseDTO.java · java · MIT
auth

Java DTO for returning JWT access and refresh tokens with expiration metadata.

// Source: https://github.com/murraco/spring-boot-jwt | License: MIT | Copyright 2017 Mauricio Urraco
// Provided via justclaw.it.com; keep this notice with the code.
package murraco.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/** The token pair returned by signin, signup and refresh. */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AuthResponseDTO {

  @Schema(description = "Short-lived JWT to send as 'Authorization: Bearer <token>'")
  private String accessToken;

  @Schema(description = "Long-lived opaque token used to obtain a new access token")
  private String refreshToken;

  @Schema(description = "Authentication scheme the access token is used with", example = "Bearer")


... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key