mbauer83.zio_http_authorization.User$.User
See theUser companion object
trait User[I <: UserId, T <: TenantId] extends Product, Serializable
A user in the bounded context of role-based authorization.
tenantId
is optional since superusers will not belong to any tenant. User-models for single-tenant systems can use Nothing
as the type for the tenantId.
Attributes
- Example
-
Example usage without tenantId
case class ExampleUser(id: String, roles: Set[Role], permissions: Set[(Permission, ResourceSelector[_, _])], otherData: String) extends User[String, Nothing]: val tenantId: Option[Nothing] = None
Example usage with UUID for id and tenantId
case class ExampleUser( id: UUID, tenantId: Option[UUID], roles: Set[Role], permissions: Set[(Permission, ResourceSelector[_, _])], otherData: String ) extends User[UUID, UUID]
- Companion
- object
- Graph
-
- Supertypes
- Known subtypes
-
trait UserWithoutTenantId[I]
Members list
In this article