Is CQRS login in Command or Query?

Asked

Viewed 59 times

0

Hello, I will do Login in hand (would not use Identity or any other lib or service) I am using CQRS, I wonder if I should put the Login as Command or as Query, given that there will only be a logic that checks if the user and password exist and then returns the Token.

1 answer

-1

Hello, in my view CQRS is relevant when you, within the same delimited context, have input flows or obtain data, being interesting to use an Handler for each use case of your business (business). As your login service will only have the responsibility to answer if the user is in the bank and return the token, I imagine it is JWT, I do not see the real gain in this scenario for the use of CQRS. An API accessing a Service class would possibly already serve.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.