Module: Janus

Defined in:
lib/janus/strategies/remote_authenticatable.rb,
lib/janus.rb,
lib/janus/rails.rb,
lib/janus/hooks.rb,
lib/janus/config.rb,
lib/janus/version.rb,
lib/janus/manager.rb,
lib/janus/strategies.rb,
lib/janus/models/base.rb,
lib/janus/test_helper.rb,
lib/janus/strategies/base.rb,
lib/janus/models/trackable.rb,
lib/janus/models/confirmable.rb,
lib/janus/controllers/helpers.rb,
lib/janus/models/remote_token.rb,
lib/janus/models/rememberable.rb,
lib/janus/controllers/url_helpers.rb,
lib/janus/strategies/rememberable.rb,
lib/janus/controllers/internal_helpers.rb,
lib/janus/models/token_authenticatable.rb,
lib/generators/janus/install_generator.rb,
lib/janus/models/remote_authenticatable.rb,
lib/generators/janus/resource_generator.rb,
lib/janus/models/database_authenticatable.rb,
lib/janus/strategies/token_authenticatable.rb,
lib/janus/models/legacy_password_authenticatable.rb

Overview

IMPROVE: redirect to clean the URL from the auth_token.

Defined Under Namespace

Modules: Config, Generators, Helpers, Hooks, InternalHelpers, Models, Strategies, TestHelper, UrlHelpers, VERSION Classes: ConfirmationsController, Mailer, Manager, NotAuthenticated, PasswordsController, RegistrationsController, SessionsController

Class Method Summary collapse

Class Method Details

.config {|Janus::Config| ... } ⇒ Object

Yields:



48
49
50
51
# File 'lib/janus.rb', line 48

def self.config
  yield(Janus::Config) if block_given?
  Janus::Config
end

.scope_for(user_or_scope) ⇒ Object



40
41
42
43
44
45
46
# File 'lib/janus.rb', line 40

def self.scope_for(user_or_scope)
  case user_or_scope
  when Symbol then user_or_scope
  when String then user_or_scope.to_sym
  else user_or_scope.class.name.underscore.to_sym
  end
end

.versionObject



2
3
4
# File 'lib/janus/version.rb', line 2

def self.version
  Gem::Version.new File.read(File.expand_path('../../../VERSION', __FILE__))
end