io.github.jahrim.chess.authentication.service.components.data.Token.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of authentication-service Show documentation
Show all versions of authentication-service Show documentation
A service which handles registration and authentication in an application.
package io.github.jahrim.chess.authentication.service.components.data
import java.time.Instant
import java.time.temporal.ChronoUnit
import java.util.UUID
/**
* A permit for accessing sensitive operations in this service.
*
* @param id the identifier of this [[Token]].
*/
case class Token(
id: String = UUID.randomUUID.toString,
expiration: Instant = Instant.now.plus(30, ChronoUnit.MINUTES)
)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy