Module: Clearance

Defined in:
lib/clearance.rb,
lib/clearance/user.rb,
lib/clearance/token.rb,
lib/clearance/engine.rb,
lib/clearance/session.rb,
lib/clearance/version.rb,
lib/clearance/back_door.rb,
lib/clearance/controller.rb,
lib/clearance/constraints.rb,
lib/clearance/rack_session.rb,
lib/clearance/authorization.rb,
lib/clearance/configuration.rb,
lib/clearance/sign_in_guard.rb,
lib/clearance/authentication.rb,
lib/clearance/session_status.rb,
lib/clearance/password_strategies.rb,
lib/clearance/testing/view_helpers.rb,
lib/clearance/constraints/signed_in.rb,
lib/clearance/default_sign_in_guard.rb,
lib/clearance/constraints/signed_out.rb,
lib/clearance/password_strategies/argon2.rb,
lib/clearance/password_strategies/bcrypt.rb,
lib/clearance/testing/controller_helpers.rb,
app/controllers/clearance/base_controller.rb,
lib/clearance/testing/deny_access_matcher.rb,
lib/generators/clearance/specs/specs_generator.rb,
lib/generators/clearance/views/views_generator.rb,
lib/generators/clearance/routes/routes_generator.rb,
lib/generators/clearance/install/install_generator.rb

Defined Under Namespace

Modules: Authentication, Authorization, Constraints, Controller, Generators, PasswordStrategies, Testing, User Classes: BackDoor, BaseController, Configuration, DefaultSignInGuard, Engine, FailureStatus, PasswordsController, RackSession, Session, SessionsController, SignInGuard, SuccessStatus, Token, UsersController

Constant Summary collapse

VERSION =
"2.9.3".freeze

Class Method Summary collapse

Class Method Details

.configurationClearance::Configuration

Returns Clearance's current configuration.

Returns:



267
268
269
# File 'lib/clearance/configuration.rb', line 267

def self.configuration
  @configuration ||= Configuration.new
end

.configuration=(config) ⇒ Object

Set Clearance's configuration

Parameters:



273
274
275
# File 'lib/clearance/configuration.rb', line 273

def self.configuration=(config)
  @configuration = config
end

.configure {|config| ... } ⇒ Object

Modify Clearance's current configuration

Clearance.configure do |config|
  config.routes = false
end

Yield Parameters:



284
285
286
# File 'lib/clearance/configuration.rb', line 284

def self.configure
  yield configuration
end