Module: RailsJwtAuth

Defined in:
lib/rails_jwt_auth.rb,
lib/rails_jwt_auth/engine.rb,
lib/rails_jwt_auth/version.rb,
lib/rails_jwt_auth/jwt/manager.rb,
lib/rails_jwt_auth/jwt/request.rb,
lib/rails_jwt_auth/spec/helpers.rb,
lib/rails_jwt_auth/strategies/jwt.rb,
lib/rails_jwt_auth/spec/not_authorized.rb,
app/helpers/rails_jwt_auth/render_helper.rb,
app/helpers/rails_jwt_auth/warden_helper.rb,
app/models/concerns/rails_jwt_auth/confirmable.rb,
app/models/concerns/rails_jwt_auth/recoverable.rb,
app/controllers/rails_jwt_auth/sessions_controller.rb,
app/models/concerns/rails_jwt_auth/authenticatable.rb,
app/controllers/rails_jwt_auth/passwords_controller.rb,
app/controllers/rails_jwt_auth/confirmations_controller.rb,
app/controllers/rails_jwt_auth/registrations_controller.rb

Defined Under Namespace

Modules: Authenticatable, Confirmable, Jwt, Recoverable, RenderHelper, Spec, Strategies, WardenHelper Classes: ConfirmationsController, Engine, InstallGenerator, Mailer, PasswordsController, RegistrationsController, SessionsController

Constant Summary collapse

VERSION =
'0.6.0'
@@model_name =
'User'
@@auth_field_name =
'email'
@@auth_field_email =
true
@@jwt_expiration_time =
7.days
@@jwt_issuer =
'RailsJwtAuth'
@@simultaneous_sessions =
2
@@mailer_sender =
"[email protected]"
@@confirmation_url =
nil
@@confirmation_expiration_time =
1.day
@@reset_password_url =
nil
@@reset_password_expiration_time =
1.day

Class Method Summary collapse

Class Method Details

.modelObject



40
41
42
# File 'lib/rails_jwt_auth.rb', line 40

def self.model
  @@model_name.constantize
end

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

Yields:

  • (_self)

Yield Parameters:

  • _self (RailsJwtAuth)

    the object that the method was called on



44
45
46
# File 'lib/rails_jwt_auth.rb', line 44

def self.setup
  yield self
end