title: How to fix the problem with Keycloak Spring boot application
body: <p>I am using Keycloak for securing Spring boot application. In my case, I use Keycloak to secure microservices. The services call one-another. For calling services, I am using Keycloak's client_credentials grant. I created a client and configured spring boot with Keycloak properties. Everything works fine but except for one thing. When I send a GET request to secured endpoints, I am getting the right response. But, If I send a POST request, I am getting an Error. The error is </p>
  
  <pre><code>"timestamp": "2019-04-17T11:38:39.737+0000",
  "status": 403,
  "error": "Forbidden",
  "message": "Access to the requested resource has been denied",
  "path": "/v1/users/register"
  </code></pre>
  
  <p>I have tried to configure Spring boot with</p>
  
  <pre><code>##-------------- Keycloak configuration ----------------------------
  keycloak.realm=phantomwallet
  keycloak.auth-server-url=http://localhost:8080/auth/
  keycloak.resource=wallet_client
  keycloak.credentials.secret=ebb59830-2abc-4a92-9d67-b6bfb3eb3bd2
  keycloak.bearer-only=true
  #keycloak.use-resource-role-mappings=true
  keycloak.principal-attribute=preferred_username
  keycloak.security-constraints[0].auth-roles[0]=client_role
  keycloak.security-constraints[0].auth-roles[1]=basic_role
  keycloak.security-constraints[0].security- 
  collections[0].patterns[0]=/*
  </code></pre>