Skip to main content

Class: SecurityDefinitions

SecurityDefinitions is a representation of OpenAPI v2 specification's Security Definitions object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject

A declaration of the security schemes available to be used in the specification. This does not enforce the security schemes on the operations and only serves to provide the relevant details for each scheme.

Properties​

security​

security: object

A single security scheme definition, mapping a "name" to the scheme it defines.

Index Signature​

[k: string]: $Properties

Methods​

toJSON()​

toJSON(): object

Converts this SecurityDefinitions to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): SecurityDefinitions & $Shape

Creates a new SecurityDefinitions instance using the specified properties.

Parameters​
properties?​

$Shape

Properties to set

Returns​

SecurityDefinitions & $Shape

SecurityDefinitions instance

Call Signature​

static create(properties?): SecurityDefinitions

Creates a new SecurityDefinitions instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

SecurityDefinitions

SecurityDefinitions instance


decode()​

static decode(reader, length?): SecurityDefinitions & $Shape

Decodes a SecurityDefinitions message from the specified reader or buffer.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

length?​

number

Message length if known beforehand

Returns​

SecurityDefinitions & $Shape

SecurityDefinitions

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): SecurityDefinitions & $Shape

Decodes a SecurityDefinitions message from the specified reader or buffer, length delimited.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

SecurityDefinitions & $Shape

SecurityDefinitions

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


encode()​

static encode(message, writer?): Writer

Encodes the specified SecurityDefinitions message. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.verify|verify messages.

Parameters​

message​

$Properties

SecurityDefinitions message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

Encodes the specified SecurityDefinitions message, length delimited. Does not implicitly grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.verify|verify messages.

Parameters​

message​

$Properties

SecurityDefinitions message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): SecurityDefinitions

Creates a SecurityDefinitions message from a plain object. Also converts values to their respective internal types.

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

SecurityDefinitions

SecurityDefinitions


toObject()​

static toObject(message, options?): object

Creates a plain object from a SecurityDefinitions message. Also converts values to other types if specified.

Parameters​

message​

SecurityDefinitions

SecurityDefinitions

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object