summaryrefslogtreecommitdiff
path: root/app/controllers/api/authentications_controller
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/api/authentications_controller')
-rw-r--r--app/controllers/api/authentications_controller/create_logic.rb23
1 files changed, 0 insertions, 23 deletions
diff --git a/app/controllers/api/authentications_controller/create_logic.rb b/app/controllers/api/authentications_controller/create_logic.rb
deleted file mode 100644
index 782c760..0000000
--- a/app/controllers/api/authentications_controller/create_logic.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-module Api
- class AuthenticationsController
- # The logic for the create method of AuthenticationsController.
- class CreateLogic
- include TokenGenerationConcern
-
- def initialize(params)
- @email = params[:email]
- @password = params[:password]
- @user_account = UserAccount.find_by(email: @email)
- end
-
- def call
- return unless @user_account&.authenticate(@password)
-
- generate_user_session_key(@user_account)
- generate_token
- end
- end
- end
-end