Skip to main content

Module auth

Module auth 

Source
Expand description

Authorization contracts: actions, validator trait and path rules.

The server-side flow is: extract Authorization: Bearer <token> → verify it (via a TokenVerifier of your choice) into TokenClaims → ask a Validator whether the claims allow the requested path + Action.

Structs§

PathValidator
The default validator: permission check + path-prefix check.

Enums§

Action
The operation a client is trying to perform.
AuthError
Errors raised during authorization.

Traits§

TokenVerifier
Turns a raw bearer token string into validated claims.
Validator
Decides whether claims are allowed to perform action on path.