Sha256: f1815f0e95efc26fbff0af616c09c6c3467b451d9362ff6053d46938c2fb5c19
Contents?: true
Size: 408 Bytes
Versions: 8
Compression:
Stored size: 408 Bytes
Contents
module SimpleTokenAuthentication class ExceptionFallbackHandler include Singleton # Notifies the failure of authentication to Warden in the same Devise does. # Does result in an HTTP 401 response in a Devise context. def fallback!(controller, entity) throw(:warden, scope: entity.name_underscore.to_sym) if controller.send("current_#{entity.name_underscore}").nil? end end end
Version data entries
8 entries across 8 versions & 1 rubygems