Closed shadyan closed 7 years ago
@shadyan wow, thanks a lot! I'm a bit embarrassed on how messed up this thing was. I think we got confused with the sign up service example from other chapters. I fixed it all up, it should be published already 🙂 .
I wrote your name in the acknowledgments chapter too 👏
Cheers!
Cheers. Big fan of the book.
In
Chapter 5: Domain Services
, specifically in theDomain Services and Infrastructure Services
section, it talks about aSignUp
service when I think it's supposed to beSignIn
instead. The same misnomer also spills into theTesting Domain Services
section.Just to clarify the intent: The service makes sure that there is a
User
in theUserRepository
with the provided username, and that the hash of the password of that user is the same as the hash of the "unencrypted password". Unless I'm missing some key point here I think the intent is singing in (authentication) of the user (the namespace of the implementation alludes to that:namespace Ddd\Auth\Infrastructure\Authentication;
) and not signing up (registration) .Another pretty strong clue is this snippet from the example of a Symfony DIC configuration:
(notice the
id
)The classes and testing methods in the
Domain Services and Infrastructure Services
andTesting Domain Services
sections of Chapter 5 should be renamed toSignIn
instead ofSignUp
to not cause confusion.If I had to guess I'd say this occurred because the previous section,
Application Services
, talked about aSignUpController
and the name "SignUp" carried over, but the action changed.