Expand description
MACRO-12 — the auth activation’s parameters, as types.
Every parameter of super::auth_activation’s methods is one of these
instead of a bare String, and the activation is compiled with
#[plexus_macros::activation(typed_params)], so a bare string cannot come
back. Each type:
- is validated once, at the wire:
Deserializegoes throughTryFrom<String>, so a bad value isInvalidParamsnaming the parameter (role:a.bis not a role name …) before the method runs; - serializes as the same plain string it always was (
#[serde(transparent)]), so the JSON on the wire does not change by a byte; - is
$defs/<Name> { type: string }behind a$refin the schema (the shape ACCESS-6 / ACCESS-43 found synapse and hub-codegen read); - has
Display,as_str(), and no public field.
The names are the parameters’ own. They live in this module, not at
plexus_core::plexus::*, because MethodPath, RoleName and
Principal already name the identity layer’s types there; reach them as
plexus_core::plexus::auth_params::RoleName and so on.
Structs§
- Grant
Name - One entry of a role’s grants: a grant (
tickets.get) or a role whose grants it includes (viewer). No@, no whitespace. - Method
Path - A method, as
<activation>.<method>—tickets.set_status. Two or more dot-separated segments, none empty, no whitespace. - Principal
- A Plexus principal:
key:<hex>,oidc:<issuer>/<subject>,idp:<subject>, … — the identity layer’s grammar, checked here;Principal::principalis the parsed value. - Provider
Name - A sign-in provider’s name, as
auth.providerslists it (workos,plexus-idp). One word. - Role
Name - A role’s name —
editor. One word: no.(that is a grant), no@(that is a ceiling entry), no whitespace. - Scope
Name - Where a role is held: a scope name (
MENGER) or*, everywhere. What a name means is the service’s; it is not blank.