Skip to main content

Module security

Module security 

Source
Expand description

Lowering OpenAPI security schemes and requirements into the IR.

Only the shared lowering pass runs here: it catalogues the document’s components.securitySchemes and resolves each operation’s effective security requirement. Both emitters read the result. The client turns supported schemes into credential fields and rejects operations that require an crate::ir::SecuritySchemeKind::Unsupported scheme. The server names the requirement in each trait method’s doc comment, but emits no check: only the application knows how to verify a credential.

Functions§

effective_requirements
The security requirements in effect for an operation: its own security if present (an empty list explicitly disables auth), otherwise the document’s global security.
required_keys
The distinct scheme keys required by requirements, in first-seen order.
scheme_catalogue
Build the ordered catalogue of security schemes declared in the document, in components.securitySchemes declaration order.