Validates command actors and delegates authorization to the host application.
Summary
Callbacks
Authorizes one BlogEngine action in the host application's policy layer.
Functions
Returns the canonical action catalog accepted by BlogEngine authorizers.
Returns the validated canonical actor identity for a command context.
Validates the command actor, then invokes the context-selected authorizer.
Callbacks
@callback authorize(BlogEngine.Context.t(), atom(), struct() | map()) :: :ok | {:error, :forbidden}
Authorizes one BlogEngine action in the host application's policy layer.
Functions
@spec actions() :: [atom()]
Returns the canonical action catalog accepted by BlogEngine authorizers.
@spec actor(BlogEngine.Context.t()) :: {:ok, %{type: String.t(), key: String.t()}} | {:error, BlogEngine.Error.t()}
Returns the validated canonical actor identity for a command context.
@spec authorize(BlogEngine.Context.t(), atom(), struct() | map()) :: :ok | {:error, BlogEngine.Error.t()}
Validates the command actor, then invokes the context-selected authorizer.