Module: Jets::Router::Route::Authorizer

Extended by:
ModuleMethods
Includes:
ModuleMethods
Included in:
Jets::Router::Route
Defined in:
lib/jets/router/route/authorizer.rb

Defined Under Namespace

Modules: ModuleMethods

Instance Method Summary collapse

Methods included from ModuleMethods

logical_id, metadata

Instance Method Details

#api_key_requiredObject



27
28
29
# File 'lib/jets/router/route/authorizer.rb', line 27

def api_key_required
  @options[:api_key_required]
end

#authorization_scopesObject



19
20
21
# File 'lib/jets/router/route/authorizer.rb', line 19

def authorization_scopes
  @options[:authorization_scopes]
end

#authorization_typeObject



23
24
25
# File 'lib/jets/router/route/authorizer.rb', line 23

def authorization_type
  @options[:authorization_type] || inferred_authorization_type
end

#authorizerObject



15
16
17
# File 'lib/jets/router/route/authorizer.rb', line 15

def authorizer
  @options[:authorizer]
end

#authorizer_id(prefix_class: true) ⇒ Object

IE: main#protect => MainProtectAuthorizer



4
5
6
7
# File 'lib/jets/router/route/authorizer.rb', line 4

def authorizer_id(prefix_class: true)
  return unless authorizer
  logical_id(authorizer, prefix_class: prefix_class)
end

#authorizer_metadataObject

Metadata about the authorizer class that can be used later. Stored in the Authorizer template parameters. In app_class.rb ‘def controller_params` it is used to build the input parameters for controller templates.



11
12
13
# File 'lib/jets/router/route/authorizer.rb', line 11

def 
  (authorizer)
end