Sha256: 511a4d7922c6b8568d489d6450a1f059147600d2926873e9e14b2d406c1ca006
Contents?: true
Size: 967 Bytes
Versions: 21
Compression:
Stored size: 967 Bytes
Contents
class Jets::Resource::ApiGateway::Method module Authorization private def authorizer_id if @route.authorizer logical_id = @route.authorizer_id elsif controller_klass.authorizer logical_id = controller_klass.authorizer_logical_id_for(@route.action_name) end "!Ref #{logical_id}" if logical_id end def authorization_type type = @route.authorization_type || controller_klass.authorization_type || # Already handles inheritance via class_attribute, applies controller-wide controller_klass.infer_authorization_type_for(@route.action_name) || # Applies specifically to route Jets.config.api.authorization_type type.to_s.upcase end def api_key_required? api_key_required == true end def api_key_required @route.api_key_required || controller_klass.api_key_required || Jets.config.api.api_key_required end end end
Version data entries
21 entries across 21 versions & 1 rubygems