Sha256: 2838a2b513b69d437f6e6ed799b9adfdd8214d826749654bc3c5d50643211fe3
Contents?: true
Size: 644 Bytes
Versions: 8
Compression:
Stored size: 644 Bytes
Contents
class Trestle::Auth::SessionsController < Trestle::ApplicationController layout 'trestle/auth' skip_before_action :authenticate_user, only: [:new, :create] skip_before_action :require_authenticated_user def new end def create if authentication_backend.authenticate! redirect_to authentication_backend.previous_location || instance_exec(&Trestle.config.auth.redirect_on_login) else flash[:error] = t("admin.auth.error", default: "Incorrect login details.") redirect_to action: :new end end def destroy logout! redirect_to instance_exec(&Trestle.config.auth.redirect_on_logout) end end
Version data entries
8 entries across 8 versions & 1 rubygems