microservice-demo
microservice-demo copied to clipboard
POSTS Requests Only? + Create User and Authenticate
I have some questions, can you help me?
-
In the SecurityConfig -> TokenAuthConfig class. there's a line:
.mvcMatchers(HttpMethod.POST, "/api/user").anonymous().
That mean that only POSTs requests to "/api/user" will be allowed without the JWT Token? -
How I create a (new) user and retrieve a JWT Token to use without the user to log in?
Initially I was planning to use a simple API to create users, but then I thought that it might be interesting to experiment with Kafka, so the requests to create new users are being passed through Kafka:
https://github.com/g00glen00b/microservice-demo/blob/master/uaa-service/src/main/java/be/g00glen00b/service/service/UserService.java#L45-L51
I don't think I completely finished registration though.