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§
- Parsed
Authn - What an
@authnattribute requires.
Constants§
- AUTHN_
ATTRIBUTE - The attribute’s name.
- AUTHN_
KEYS - The keys
@authntakes, in the order its error messages list them. - AUTHN_
MAX_ AGE_ LIMIT - The largest
maxAge: one year, in seconds.
Functions§
- authn_
attribute - The
@authnamongattributes, if any (the first, when a schema repeats it; the parser refuses a repeat). - parse_
authn_ attribute - Reads a whole
@authn(...)attribute.