Class: Api::Internal::BackchannelLogoutsController

Inherits:
ActionController::API
  • Object
show all
Defined in:
lib/generators/openid_backchannel_logout/templates/backchannel_logouts_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/generators/openid_backchannel_logout/templates/backchannel_logouts_controller.rb', line 6

def create
  OpenidBackchannelLogout::Executor.new.call(request) do |sub, sid|
    Rails.logger.info("Logging out user with sub: #{sub}, sid: #{sid}")
    # TODO: Implement the logic to logout the user
  end

  render plain: 'Logout successful', status: :ok
rescue StandardError => e
  Rails.logger.error("Backchannel logout error: #{e.message}")
  render plain: e.message, status: :bad_request
end