Sha256: 72449c76d40abb320e28bdef41f93588b98cf365944df0ddc73b081c2519b6fa
Contents?: true
Size: 623 Bytes
Versions: 8
Compression:
Stored size: 623 Bytes
Contents
module SimpleTokenAuthentication class DeviseFallbackHandler include Singleton # Fallback to the Devise authentication strategies. def fallback!(controller, entity) authenticate_entity!(controller, entity) end # Devise authentication is performed through a controller # which includes Devise::Controllers::Helpers # See http://rdoc.info/github/plataformatec/devise/master/\ # Devise/Controllers/Helpers#define_helpers-class_method def authenticate_entity!(controller, entity) controller.send("authenticate_#{entity.name_underscore}!".to_sym) end end end
Version data entries
8 entries across 8 versions & 1 rubygems