Module: Clearance

Defined in:
lib/clearance.rb,
lib/clearance/user.rb,
lib/clearance/token.rb,
lib/clearance/engine.rb,
lib/clearance/version.rb,
lib/clearance/session.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/sign_in_guard.rb,
lib/clearance/configuration.rb,
lib/clearance/authentication.rb,
lib/clearance/session_status.rb,
lib/clearance/testing/helpers.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/sha1.rb,
lib/clearance/password_strategies/bcrypt.rb,
lib/clearance/testing/controller_helpers.rb,
lib/clearance/testing/deny_access_matcher.rb,
lib/clearance/password_strategies/blowfish.rb,
lib/generators/clearance/views/views_generator.rb,
lib/generators/clearance/specs/specs_generator.rb,
lib/generators/clearance/routes/routes_generator.rb,
lib/generators/clearance/install/install_generator.rb,
lib/clearance/password_strategies/bcrypt_migration_from_sha1.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

VERSION =
"1.11.0"

Class Method Summary collapse

Class Method Details

.configurationClearance::Configuration

Returns Clearance's current configuration

Returns:



151
152
153
# File 'lib/clearance/configuration.rb', line 151

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

.configuration=(config) ⇒ Object

Set Clearance's configuration

Parameters:



157
158
159
# File 'lib/clearance/configuration.rb', line 157

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:



168
169
170
# File 'lib/clearance/configuration.rb', line 168

def self.configure
  yield configuration
end

.rootObject

Deprecated.

Use Gem::Specification API if you need to access Clearance's Gem root.



15
16
17
18
19
20
# File 'lib/clearance.rb', line 15

def self.root
  warn "#{Kernel.caller.first}: [DEPRECATION] `Clearance.root` is " +
    "deprecated and will be removed in the next major release. If you need " +
    "to find Clearance's root, you can use the `Gem::Specification` API."
  File.expand_path('../..', __FILE__)
end