alexbruf/elm-clerk/2.0.0

Clerk.Actor

The Clerk actor claim, present on a session that is being impersonated.

type alias Actor =
{ sub : String
, type_ : Maybe String
}

Who is acting on behalf of the session's user.

sub is the impersonator's user id. The JSON key type becomes the Elm field type_, because type is a reserved word.

decoder : Decoder Actor

Decode an Actor from the JSON the shim sends.

{ "sub": "user_admin", "type": "impersonation" }