Exposing the authentication service

Your first move towards rolling out the authentication service is to create the definition of the request and response messages used for the authentication service. Since CCM favors JSON as a wire format, you're using the JSON schema to strictly define the schemas of the login request and response messages and the logout request and response messages (these schemas can be found in Appendix, Message Schemas).

With this done, you can now turn to coding and start by creating a new class unsurprisingly named AuthenticationService. It will take care of the communication with RabbitMQ and the dispatch to the internal classes that are actually performing the authentication. Let's look at the first part of the constructor ...

Get RabbitMQ Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.