Sha256: a5cc2b6e9d34c6dda143a98b0ebfea0bf87c22293d2072518bdee8cd2ad80e28
Contents?: true
Size: 941 Bytes
Versions: 3
Compression:
Stored size: 941 Bytes
Contents
# frozen_string_literal: true module Yori module Schema module V3 # SecurityRequirement: # Lists the required security schemes to execute this operation. # The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object. class SecurityRequirement < Yori::SchemaBase # @!method scheme # Each key MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. # If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution. # For other security scheme types, the array MUST be empty. def scheme(key, scopes) self[key.to_s] ||= [] self[key.to_s].concat(scopes) end # TODO: validate with related SecurityScheme type... end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
yori-0.1.2 | lib/yori/schema/v3/security_requirement.rb |
yori-0.1.1 | lib/yori/schema/v3/security_requirement.rb |
yori-0.1.0 | lib/yori/schema/v3/security_requirement.rb |