Module: ApiGuard

Defined in:
lib/api_guard.rb,
lib/api_guard/engine.rb,
lib/api_guard/modules.rb,
lib/api_guard/version.rb,
lib/api_guard/app_secret_key.rb,
lib/api_guard/models/concerns.rb,
lib/api_guard/resource_mapper.rb,
lib/api_guard/test/controller_helper.rb,
lib/api_guard/jwt_auth/authentication.rb,
lib/api_guard/jwt_auth/json_web_token.rb,
lib/api_guard/jwt_auth/blacklist_token.rb,
app/models/api_guard/application_record.rb,
lib/api_guard/jwt_auth/refresh_jwt_token.rb,
lib/api_guard/response_formatters/renderer.rb,
app/controllers/api_guard/tokens_controller.rb,
app/controllers/api_guard/passwords_controller.rb,
app/controllers/api_guard/application_controller.rb,
app/controllers/api_guard/registration_controller.rb,
app/controllers/api_guard/authentication_controller.rb,
lib/generators/api_guard/controllers/controllers_generator.rb,
lib/generators/api_guard/initializer/initializer_generator.rb

Defined Under Namespace

Modules: JwtAuth, Models, Modules, Resource, ResponseFormatters, Test Classes: AppSecretKey, ApplicationController, ApplicationRecord, AuthenticationController, ControllersGenerator, Engine, InitializerGenerator, PasswordsController, RegistrationController, ResourceMapper, TokensController

Constant Summary collapse

VERSION =
'0.3.0'.freeze
@@mapped_resource =
{}

Class Method Summary collapse

Class Method Details

.map_resource(routes_for, class_name) ⇒ Object



34
35
36
# File 'lib/api_guard.rb', line 34

def self.map_resource(routes_for, class_name)
  @@mapped_resource[routes_for.to_sym] = ApiGuard::ResourceMapper.new(routes_for, class_name)
end

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (ApiGuard)

    the object that the method was called on



30
31
32
# File 'lib/api_guard.rb', line 30

def self.setup
  yield self
end