Skip to main content

The screen

An application with Livewire embeds the self-service screen on a page of its own settings:

<livewire:sanctum-hardening.tokens />

Put the page behind auth and password.confirm: the screen mints through PersonalTokens, which refuses a mint without a password confirmed a moment ago.

What it shows​

  • A form with a name, the abilities of the catalog a person may grant, and the lifetimes a mint accepts, never one over minting.max_lifetime. A reserved ability is never among them.
  • The plain text of a new token, once, on the answer to its mint. The next action clears it.
  • Every token of the signed-in user, the newest first, with its name, prefix, abilities, expiry and last use, and a button that revokes it after asking. A token with a reserved ability is not listed.

A refusal is said on the status line, which a screen reader announces.

WireKit or plain​

The screen ships a view built from WireKit components and a plain one. sanctum-hardening.ui.variant decides: wirekit, plain, or auto, the default, which renders the WireKit view where pushery/wirekit is installed. Publish the views with --tag=sanctum-hardening-views to restyle them.