microservice-demo icon indicating copy to clipboard operation
microservice-demo copied to clipboard

POSTS Requests Only? + Create User and Authenticate

Open jnrbo opened this issue 6 years ago • 1 comments

I have some questions, can you help me?

  1. 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?

  2. How I create a (new) user and retrieve a JWT Token to use without the user to log in?

jnrbo avatar Jun 15 '18 01:06 jnrbo

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.

g00glen00b avatar Jun 15 '18 05:06 g00glen00b