module

Devise

Constants

MAPPINGS = [] of Nil

HTTP-layer registries (see src/http/mappings.cr): filled by the devise macro below, looked up by end-of-program codegen.

Class methods

allow_unconfirmed_access_for
Source
allow_unconfirmed_access_for=(allow_unconfirmed_access_for : Time::Span | Nil)
Source
authenticatable_salt(mapping : Mapping, user : ActiveRecord::Base) : String | Nil

Salt для warden-ключа: encrypted_password[0,29] (метод модели authenticatable_salt доступен только на конкретном классе, чтение — через attrs-прок маппинга).

Source
confirm_within
Source
confirm_within=(confirm_within : Time::Span | Nil)
Source
current(controller : ActionController::Base, scope : String = default_scope) : ActiveRecord::Base | Nil

Текущий пользователь контроллера: сначала warden-ключ сессии, при провале — remember-cookie (auto sign-in, оракул-кейс http_remember_auto_sign_in_status). nil для не найденного/просроченного.

Source
default_scope

Маппинг скопа → модель (default_scope по умолчанию "user").

Source
default_scope=(default_scope : String)

Маппинг скопа → модель (default_scope по умолчанию "user").

Source
email_regexp
Source
email_regexp=(email_regexp)
Source
find_scope(resource : ActiveRecord::Base) : String

Скоп по ресурсу/классу (публичная утилита — как Devise::Mapping.find_scope!).

Source
friendly_token(length : Int32 = 20) : String

SecureRandom.urlsafe_base64(15).tr('lIO0', 'sxyz') — 20 chars.

Source
last_attempt_warning
Source
last_attempt_warning=(last_attempt_warning)
Source
load_locale(path : String) : Nil
Source
locale

I18n.locale / I18n.load_locale гема.

Source
locale=(loc : String) : String
Source
lock_strategy
Source
lock_strategy=(lock_strategy : Symbol)
Source
mailer_sender

Global defaults mirroring lib/devise.rb (devise 4.9.4).

Source
mailer_sender=(mailer_sender : String | Nil)

Global defaults mirroring lib/devise.rb (devise 4.9.4).

Source
mapping(resource : String | Symbol) : Mapping | Nil

devise_for(:users) → Mapping(user). nil когда модель не найдена.

Source
mapping_for(scope : String) : Devise::Mapping | Nil

Генерируется макросом finished ниже (все классы известны к концу программы).

Source
maximum_attempts
Source
maximum_attempts=(maximum_attempts : Int32)
Source
paranoid
Source
paranoid=(paranoid)
Source
password_length
Source
password_length=(password_length : Range(Int32, Int32))
Source
pepper

Defaults mirroring lib/devise.rb (devise 4.9.4).

Source
pepper=(pepper : String | Nil)

Defaults mirroring lib/devise.rb (devise 4.9.4).

Source
reconfirmable
Source
reconfirmable=(reconfirmable)
Source
remember_for
Source
remember_for=(remember_for : Time::Span)
Source
reset_password_within
Source
reset_password_within=(reset_password_within : Time::Span)
Source
reset_token_generator
Source
secret_key
Source
secret_key=(secret_key : String | Nil)
Source
secure_compare(a : String, b : String) : Bool
Source
stretches
Source
stretches=(stretches : Int32)
Source
t(path : String, scope : String | Nil = nil, count : Int32 | Nil = nil, **opts) : String | Nil

I18n.t гема в терминах порта.

Source
t!(path : String, scope : String | Nil = nil, count : Int32 | Nil = nil, **opts) : String

Строгий вариант для словарных ключей (en запечён — промах это баг интеграции, а не рантайм-условие).

Source
timeout_in
Source
timeout_in=(timeout_in : Time::Span | Nil)
Source
token_generator
Source
token_generator=(generator : TokenGenerator)
Source
token_generator_set=(token_generator_set)
Source
token_generator_set?
Source
unlock_in
Source
unlock_in=(unlock_in : Time::Span)
Source
unlock_strategy
Source
unlock_strategy=(unlock_strategy : Symbol)
Source

Nested types