Skip to main content

Module authn_attribute

Module authn_attribute 

Expand description

The procedure attribute @authn(maxAge: 300, amr: ["hwk"], acr: ["aal2"]) (ADR 0022, cratestack#1244): how recently and how strongly the caller must have authenticated.

One reader for every consumer: cratestack-parser refuses an @authn it does not read, and cratestack-macros turns what it reads into the operation’s AuthnRequirement. Keys are maxAge (seconds, 1 to one year), amr (methods that must all be present) and acr (acceptable classes, one must match); each at most once, at least one.

Structs§

ParsedAuthn
What an @authn attribute requires.

Constants§

AUTHN_ATTRIBUTE
The attribute’s name.
AUTHN_KEYS
The keys @authn takes, in the order its error messages list them.
AUTHN_MAX_AGE_LIMIT
The largest maxAge: one year, in seconds.

Functions§

authn_attribute
The @authn among attributes, if any (the first, when a schema repeats it; the parser refuses a repeat).
parse_authn_attribute
Reads a whole @authn(...) attribute.