aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/common/auth/RequestId.scala
blob: 771145c0250b0beeae6c61f48a1badeb8cdc078c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package xyz.driver.common.auth

import xyz.driver.common.logging._
import xyz.driver.common.auth.RequestId._
import xyz.driver.common.utils.RandomUtils

final case class RequestId(value: String = RandomUtils.randomString(IdLength))

object RequestId {

  private val IdLength = 20

  implicit def toPhiString(x: RequestId): PhiString = phi"RequestId(${Unsafe(x.value)})"

}