Sha256: df007e93c880275e3cce28966ec1b9de39035f4c5ebaecb5e18f1f8fef4a2ea6
Contents?: true
Size: 385 Bytes
Versions: 4
Compression:
Stored size: 385 Bytes
Contents
module SimpleTokenAuthentication class ExceptionFallbackHandler # 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
4 entries across 4 versions & 1 rubygems