The authenticated caller of a command or query.
Built by an Arc.Authentication handler from whatever your application already uses to
authenticate (phx.gen.auth, a token plug, a reverse proxy). Arc never invents a second
authentication system.
Summary
Functions
Whether another identity is acting on behalf of this principal.
The identity acting on behalf of this principal, or nil.
The anonymous principal.
Whether the principal has at least one of the given roles.
Builds an authenticated principal.
Types
Functions
Whether another identity is acting on behalf of this principal.
In an on-behalf session the principal is the represented user (who decides what the request may
do) and actor is who is actually acting. roles never include the actor's roles.
The identity acting on behalf of this principal, or nil.
@spec anonymous() :: t()
The anonymous principal.
Whether the principal has at least one of the given roles.
Builds an authenticated principal.