Sha256: 879aa4fd35dabb20d96a3c266d3e6e5bbe13804b22eaec718b70c350f12e2f2e

Contents?: true

Size: 891 Bytes

Versions: 14

Compression:

Stored size: 891 Bytes

Contents

# frozen_string_literal: true

class Ibrain::Auth::SessionsController < Devise::SessionsController
  include ActionController::Helpers
  include Ibrain::Core::ControllerHelpers::Response
  include ActionController::MimeResponds

  # before_action :configure_sign_in_params, only: [:create]

  def create
    user = repo.sign_in
    sign_in(resource_name, user) if user.present?

    super { |resource| @resource = resource }
  end

  # GET /resource/sign_in
  # def new
  #   super
  # end

  # POST /resource/sign_in
  # def create
  #   super
  # end

  # DELETE /resource/sign_out
  # def destroy
  #   super
  # end

  # protected

  # If you have extra params to permit, append them to the sanitizer.
  # def configure_sign_in_params
  #   devise_parameter_sanitizer.permit(:sign_in, keys: [:attribute])
  # end

  private

  def repo
    AuthRepository.new(resource, params)
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ibrain-auth-0.2.3 app/controllers/ibrain/auth/sessions_controller.rb
ibrain-auth-0.2.2 app/controllers/ibrain/auth/sessions_controller.rb
ibrain-auth-0.2.1 app/controllers/ibrain/auth/sessions_controller.rb
ibrain-auth-0.2.0 app/controllers/ibrain/auth/sessions_controller.rb
ibrain-auth-0.1.9 app/controllers/ibrain/auth/sessions_controller.rb
ibrain-auth-0.1.8 app/controllers/ibrain/auth/sessions_controller.rb
ibrain-auth-0.1.7 app/controllers/ibrain/auth/sessions_controller.rb
ibrain-auth-0.1.6 app/controllers/ibrain/auth/sessions_controller.rb
ibrain-auth-0.1.5 app/controllers/ibrain/auth/sessions_controller.rb
ibrain-auth-0.1.4 app/controllers/ibrain/auth/sessions_controller.rb
ibrain-auth-0.1.3 app/controllers/ibrain/auth/sessions_controller.rb
ibrain-auth-0.1.2 app/controllers/ibrain/auth/sessions_controller.rb
ibrain-auth-0.1.1 app/controllers/ibrain/auth/sessions_controller.rb
ibrain-auth-0.1.0 app/controllers/ibrain/auth/sessions_controller.rb