Arc.Identity.Result (cratis_arc v0.1.0)

Copy Markdown View Source

The resolved identity, as served from /.cratis/me.

Summary

Functions

The HTTP status the identity contract maps this result to.

Converts the result to the /.cratis/me body.

The result for a caller who is not signed in.

Types

t()

@type t() :: %Arc.Identity.Result{
  authenticated?: boolean(),
  authorized?: boolean(),
  details: term(),
  id: String.t() | nil,
  name: String.t() | nil,
  roles: [String.t()]
}

Functions

status(result)

@spec status(t()) :: 200 | 401 | 403

The HTTP status the identity contract maps this result to.

to_wire(result)

@spec to_wire(t()) :: map()

Converts the result to the /.cratis/me body.

unauthenticated()

@spec unauthenticated() :: t()

The result for a caller who is not signed in.