Skip to content
Playground(another site)

bynk.actor.refinement_base_unsupported

Error A refinement actor's base is not a Bearer actor (no claims to authorise against).

actor Admin = User where … adds an authorisation check on a token's claims, and only a Bearer actor carries claims. So the base must be a declared Bearer actor: not Visitor, Internal or Signature, and not another refinement. Name a Bearer actor as the base, declaring it if need be.

Example

type UserId = String where NonEmpty
actor User { auth = Bearer(secret = "JWT_KEY"), identity = UserId }
actor Admin = Visitor where hasClaim("admin") // ✗ `Visitor` carries no claims
actor Admin = User where hasClaim("admin") // ✓ a `Bearer` actor

In the Book

See also

  • Every code in its category, Actors, on the diagnostic index.
  • bynk explain bynk.actor.refinement_base_unsupported shows the same from the installed toolchain, without a network.