All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.malliina.values.models.scala Maven / Gradle / Ivy

There is a newer version: 3.7.4
Show newest version
package com.malliina.values

case class Email(email: String) extends AnyVal with WrappedString {
  def value: String = email
}
object Email extends StringCompanion[Email]

case class UserId(id: Long) extends WrappedId
object UserId extends IdCompanion[UserId]

case class Username(name: String) extends AnyVal with WrappedString {
  override def value: String = name
}
object Username extends StringCompanion[Username] {
  val empty = Username("")
}

case class Password(pass: String) extends AnyVal with WrappedString {
  override def value: String = pass
  override def toString: String = "****"
}
object Password extends StringCompanion[Password]

case class AccessToken(token: String) extends TokenValue(token)
object AccessToken extends StringCompanion[AccessToken]

case class IdToken(token: String) extends TokenValue(token)
object IdToken extends StringCompanion[IdToken]

case class RefreshToken(token: String) extends TokenValue(token)
object RefreshToken extends StringCompanion[RefreshToken]

sealed abstract class TokenValue(token: String) extends WrappedString {
  override def value: String = token
  override def toString: String = token
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy