← all modules

Std.Live.Console

Std.Live.Console
  Std.Live.Console — the identity an app's console check returns, for

Types
  type alias Identity = { subject : String , email : String , claims : Dict String String }

Values
  defaultIdentity : String -> Identity
      `defaultIdentity "user-42"` — Identity with empty email + claims.
  withClaim : String -> String -> Identity -> Identity
      `withClaim "role" "admin" id` — add a single RBAC claim.
  withClaims : Dict String String -> Identity -> Identity
      `withClaims (Dict.fromList [("role", "admin"), ("tier", "pro")]) id`
  withEmail : String -> Identity -> Identity
      `withEmail "alice@example.com" id` — replace the audit email.