Class: CommandTower::Auth::LogoutController

Inherits:
CommandTower::ApplicationController show all
Includes:
CommandTower::Api::ApplicationResponseRenderer
Defined in:
app/controllers/command_tower/auth/logout_controller.rb

Constant Summary

Constants inherited from CommandTower::ApplicationController

CommandTower::ApplicationController::AUTHENTICATION_EXPIRE_HEADER, CommandTower::ApplicationController::AUTHENTICATION_HEADER, CommandTower::ApplicationController::AUTHENTICATION_WITH_RESET

Instance Method Summary collapse

Methods inherited from CommandTower::ApplicationController

#authenticate_user!, #authenticate_user_without_email_verification!, #authorize_user!, #current_user, #safe_boolean

Instance Method Details

#createObject



8
9
10
11
12
13
# File 'app/controllers/command_tower/auth/logout_controller.rb', line 8

def create
  token_data = CommandTower::Jwt::AuthorizationHelper.extract_token(request)
  token = token_data[:error] ? nil : token_data[:token]
  result = CommandTower::Workflows::Auth::LogoutWorkflow.call(token:)
  render_application_result(result)
end