ihuaylupo / manning-smia

Spring Microservices in Action - Second Edition - Code Examples
MIT License
333 stars 413 forks source link

Issues with generating tokens to access organization services #34

Open wangwei0537 opened 10 months ago

wangwei0537 commented 10 months ago

Dear author: I am a reader from China. Regarding the chapter 9 in the book, there are several questions that have always puzzled me, so I would like to ask you: The first question: There is an organization-service.properties resource file in the configserver service. The configuration parameters inside are as follows: security.oauth2.resource.userInfoUri= http://authenticationservice:8082/user signing.key: "345345fsdfsf5345" authenticationservice does not seem to have appeared before. Is signing.key also useful in Chapter 9?

Second question: According to the steps in the readme file you gave me, I cannot obtain the user token using the client key in the code. After regenerating the client key, the token can be produced normally, but when accessing http://localhost:8072/organization/v1/organization/e6a625cc-718b-48c2-ac76-1dfdff9a531e The interface address, user name and client secret key have been filled in. Others have been filled in according to the instructions in the book, and the results are returned Status code 401, so I need your help on how to run the code the correct way. I very much hope you can reply to me, thank you!

Alphabtw00 commented 9 months ago

i dont know much as i didnt use this book's version of security but as far as i know this property is used so that our resource server can go to this url and request more info about the client using the auth token presented via client.