Page Contents
Home > @loopback/openapi-spec-builder > ComponentsSpecBuilder > withSecurityScheme
ComponentsSpecBuilder.withSecurityScheme() method
Define a component security scheme.
Signature:
withSecurityScheme(name: string, securityScheme: SecuritySchemeObject | ReferenceObject): this;
Parameters
Parameter | Type | Description |
---|---|---|
name | string | The name of the security scheme |
securityScheme | SecuritySchemeObject | ReferenceObject | Specification of the security scheme |
Returns:
this