Skip to content

Instantly share code, notes, and snippets.

@jeroenr
Last active July 17, 2017 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeroenr/3caa0ccd56d855894f97eb06647909c0 to your computer and use it in GitHub Desktop.
Save jeroenr/3caa0ccd56d855894f97eb06647909c0 to your computer and use it in GitHub Desktop.
Sample auth info claim
sealed trait ClaimModel
case class AuthInfo(
referenceToken: String, // unique token
userId: String, // id of the user entity
permissions: List[String], // list of permission ids
groupIds: List[String], // list of group ids
expirationDate: Option[Long] // expiration date of the user account
) extends ClaimModel
object ClaimModel extends DefaultJsonProtocol {
implicit val authInfoFormat = jsonFormat5(AuthInfo)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment