Module: Challah
- Extended by:
- Authenticators, Plugins, Providers, Techniques
- Defined in:
- lib/challah.rb,
lib/challah/test.rb,
lib/challah/audit.rb,
lib/challah/engine.rb,
lib/challah/random.rb,
lib/challah/signup.rb,
lib/challah/plugins.rb,
lib/challah/session.rb,
lib/challah/version.rb,
lib/challah/encrypter.rb,
lib/challah/providers.rb,
lib/challah/controller.rb,
lib/challah/techniques.rb,
lib/challah/cookie_store.rb,
lib/challah/authenticators.rb,
lib/challah/concerns/userable.rb,
lib/challah/simple_cookie_store.rb,
lib/challah/authenticators/api_key.rb,
lib/challah/concerns/authorizeable.rb,
lib/challah/concerns/user/findable.rb,
lib/challah/authenticators/password.rb,
lib/challah/concerns/user/statusable.rb,
lib/challah/concerns/user/provideable.rb,
lib/challah/concerns/user/authorizable.rb,
lib/challah/concerns/user/passwordable.rb,
lib/challah/concerns/user/validateable.rb,
lib/challah/techniques/token_technique.rb,
lib/challah/validators/email_validator.rb,
lib/challah/concerns/user/attributeable.rb,
lib/challah/providers/password_provider.rb,
lib/challah/techniques/api_key_technique.rb,
lib/challah/techniques/password_technique.rb,
lib/challah/validators/password_validator.rb,
lib/challah/concerns/user/authenticateable.rb
Defined Under Namespace
Modules: Audit, Authenticators, Authorizeable, Controller, Plugins, Providers, Techniques, Testing, UserAttributeable, UserAuthenticateable, UserAuthorizable, UserFindable, UserPasswordable, UserProvideable, UserStatusable, UserValidateable, Userable Classes: ApiKeyTechnique, CookieStore, EmailValidator, Encrypter, Engine, PasswordProvider, PasswordTechnique, PasswordValidator, Random, Session, Signup, SimpleCookieStore, TestSessionStore, TokenTechnique
Constant Summary collapse
- VERSION =
File.read(File.('../../../VERSION', __FILE__)).strip.freeze
Class Method Summary collapse
-
.include_user_plugins! ⇒ Object
Loop through all registered plugins and extend User functionality.
-
.options ⇒ Object
Configuration options Get or set options for the current Challah instance.
- .user ⇒ Object
Methods included from Techniques
register_technique, remove_technique, techniques
Methods included from Plugins
Methods included from Authenticators
authenticators, register_authenticator
Methods included from Providers
custom_providers, providers, register_provider
Class Method Details
.include_user_plugins! ⇒ Object
Loop through all registered plugins and extend User functionality.
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/challah/plugins.rb', line 43 def self.include_user_plugins! Challah.plugins.values.each do |plugin| plugin.user_extensions.each do |mod| Challah.user.send(:extend, mod) end plugin.user_init_methods.each do |method_name| Challah.user.send(method_name) end end end |
.options ⇒ Object
Configuration options Get or set options for the current Challah instance. In most cases these should be changed within a config/initializers/ file in your app.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/challah.rb', line 48 def self. @options ||= { access_denied_view: "sessions/access_denied", api_key_enabled: false, token_enabled: false, token_header: "X-Auth-Token", cookie_prefix: "challah", email_validator: "challah/email", password_validator: PasswordValidator, skip_routes: false, skip_user_validations: false, storage_class: SimpleCookieStore, user: :User } end |
.user ⇒ Object
64 65 66 |
# File 'lib/challah.rb', line 64 def self.user [:user].to_s.safe_constantize end |