AuthPluginOpenApiGenerator<TContext> class final

Generates an OpenAPI 3.1 document from a frozen auth plugin registry.

The registry's endpoint descriptors are the route source of truth. Adding or removing a plugin therefore changes the generated contract without a separate route catalogue.

Constructors

AuthPluginOpenApiGenerator({AuthPluginOpenApiConfig config = const AuthPluginOpenApiConfig()})
Creates an auth OpenAPI generator with config.
const

Properties

config → AuthPluginOpenApiConfig
The settings used when generating the document.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

generate({required AuthServerPluginRegistry<TContext> registry, required OpenApiInfo info, List<OpenApiServer> servers = const <OpenApiServer>[]}) → OpenApiSpec
Generates an OpenAPI document from a frozen registry.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

apiKeySecurityScheme → const String
Component name for the API-key security scheme.
bearerSecurityScheme → const String
Component name for the bearer security scheme.
breachedPasswordExtension → const String
Extension name describing breached-password policy.
captchaExtension → const String
Extension name describing captcha policy.
csrfPolicyExtension → const String
Extension name describing the CSRF policy.
genericErrorSchema → const String
Component name for the generic auth error schema.
operationSemanticsExtension → const String
Extension name describing persistence and replay semantics.
originPolicyExtension → const String
Extension name describing the browser-origin policy.
pluginExtension → const String
Extension name identifying the plugin that owns an operation.
rateLimitOperationExtension → const String
Extension name describing the rate-limit operation.
sessionCookieSecurityScheme → const String
Component name for the session-cookie security scheme.
twoFactorChallengeSchema → const String
Component name for the two-factor challenge schema.