Class: Locomotive::Steam::Middlewares::Auth

Inherits:
ThreadSafe
  • Object
show all
Includes:
Concerns::AuthHelpers, Concerns::Helpers, Concerns::Recaptcha
Defined in:
lib/locomotive/steam/middlewares/auth.rb

Overview

Process all the authentication actions:

  • sign up

  • sign in

  • new reset password

  • reset password

  • sign out

It is also in charge to load the current authenticated resource from the session and put it in the liquid context.

Defined Under Namespace

Classes: AuthOptions

Constant Summary

Constants included from Concerns::Helpers

Concerns::Helpers::CACHE_HEADERS, Concerns::Helpers::HTML_CONTENT_TYPE, Concerns::Helpers::HTML_MIME_TYPES

Instance Attribute Summary

Attributes inherited from ThreadSafe

#env

Instance Method Summary collapse

Methods included from Concerns::Recaptcha

#build_invalid_recaptcha_entry, #is_recaptcha_required?, #is_recaptcha_valid?, #is_recaptcha_verified?

Methods included from Concerns::AuthHelpers

#authenticated?, #authenticated_entry_type, #store_authenticated

Methods included from Concerns::Helpers

#html?, #inject_cookies, #json?, #log, #make_local_path, #modify_path, #mounted_on, #redirect_to, #render_response

Methods inherited from ThreadSafe

#call, #decorate_entry, #default_liquid_context, #default_locale, #liquid_assigns, #live_editing?, #locale, #locales, #merge_with_params, #next, #page, #params, #path, #repositories, #request, #services, #session, #site

Instance Method Details

#_callObject



20
21
22
23
24
25
26
27
28
# File 'lib/locomotive/steam/middlewares/auth.rb', line 20

def _call
  load_authenticated_entry

  auth_options = AuthOptions.new(site, params)

  return unless auth_options.valid?

  send(:"#{auth_options.action}", auth_options)
end