Sha256: cb4fa622a08d04156ee6f1e79adc07bd0fcb10bdc23c3aa4dcc13a4bc28b2ae0

Contents?: true

Size: 584 Bytes

Versions: 4

Compression:

Stored size: 584 Bytes

Contents

class IamController < ApplicationController
  include IamHelper
  include Iam::AuthorizationProvider::Factory.current_provider

  layout false

  def menu; end

  def log_in
    return if Rails.env.production?

    log_in_account account

    render json: { notice: I18n.t('iam.log_in.success', name: account_name(account)) }
  end

  def log_out
    return if Rails.env.production?

    log_out_account account

    render json: { notice: I18n.t('iam.log_out.success') }
  end

  private
  def account
    Iam::Configuration[:account][:class].constantize.find(params[:id])
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
iam-0.3.3 app/controllers/iam_controller.rb
iam-0.3.2 app/controllers/iam_controller.rb
iam-0.3.1 app/controllers/iam_controller.rb
iam-0.3.0 app/controllers/iam_controller.rb