class Devise::Strategies::TokenAuthenticatable

def authenticate!

def authenticate!
  resource = mapping.to.find_for_token_authentication(authentication_hash)
  return fail(:invalid_token) unless resource
  if validate(resource)
    resource.after_token_authentication
    success!(resource)
  end
end