As you will know from the theoretical section, services with a secured API will have to authorize their users based on authentication tokens. In order to do that, they have to cooperate with the Keycloak server using, in our example, the OIDC protocol. Obviously, we will not implement this functionality ourselves. As we've suggested, Keycloak provides a number of adapters for different tools. WildFly Swarm has its own adapter too. So, how will we install it?
Let's extend customer-gateway's pom.xml:
(...)<dependency> <groupId>org.wildfly.swarm</groupId> <artifactId>keycloak</artifactId> <version>${version.wildfly.swarm}</version></dependency>(...)
That's it—the adapter is installed.
We have one more thing to ...