Exception: Shaf::Authentication::RealmChangedError
- Defined in:
- lib/shaf/helpers/authentication.rb
Instance Method Summary collapse
-
#initialize(from:, to:) ⇒ RealmChangedError
constructor
A new instance of RealmChangedError.
Constructor Details
#initialize(from:, to:) ⇒ RealmChangedError
Returns a new instance of RealmChangedError.
16 17 18 19 20 21 22 23 24 |
# File 'lib/shaf/helpers/authentication.rb', line 16 def initialize(from:, to:) super <<~ERR Realm was changed from "#{from}" to "#{to}". This is not allowed! Each request corresponds to a certain realm and cannot be changed. This is probably caused by a call to `current_user` using the default realm (from `Shaf::Settings.default_authentication_realm`) and then using `#authenticate realm: 'some_other_realm' ERR end |