class Swagger::V2::SecurityScheme

Class representing a Swagger “Security Scheme Object”. @see github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#securitySchemeObject

Security Scheme Object

Constants

API_KEY_TYPE
FLOW_TYPES_REQUIRING_AUTHORIZATION_URL
FLOW_TYPES_REQUIRING_TOKEN_URL
OAUTH2_TYPE

Private Instance Methods

api_key?() click to toggle source
# File lib/swagger/v2/security_scheme.rb, line 40
def api_key?
  type.to_s.downcase == API_KEY_TYPE
end
oauth2?() click to toggle source

@!endgroup

# File lib/swagger/v2/security_scheme.rb, line 36
def oauth2?
  type.to_s.downcase == OAUTH2_TYPE
end
requires_authorization_url?() click to toggle source
# File lib/swagger/v2/security_scheme.rb, line 44
def requires_authorization_url?
  oauth2? &&
    FLOW_TYPES_REQUIRING_AUTHORIZATION_URL.include?(flow.to_s.downcase)
end
requires_token_url?() click to toggle source
# File lib/swagger/v2/security_scheme.rb, line 49
def requires_token_url?
  oauth2? && FLOW_TYPES_REQUIRING_TOKEN_URL.include?(flow.to_s.downcase)
end