eugenp / tutorials

Just Announced - "Learn Spring Security OAuth":

Home Page:http://bit.ly/github-lsso

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ISSUE] on the springboot using keycloak, authorization based on role is not working.

altl-21 opened this issue · comments

Article and Module Links
(https://www.baeldung.com/spring-boot-keycloak).

Describe the Issue
I already followed the above link about keycloak.
first of all, I have got access token from keycloak server. at that time, I used credential with "user" role.
as you can see on the attached screenshot, when you call the URL using postman, I don't get any response.
Of course, I added token to header.

To Reproduce
Steps to reproduce the behavior:

  1. Run keycloak server
  2. Run the springboot serve
  3. Using postman, I call the api
  4. See error

Expected Behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
code
postman

Environment (please complete the following information):

  • OS: [Windows]
  • Postman: 10.23.5
  • Version [e.g. 22]

Hey @blackphantom0221,

Have you made any custom changes in the code?

Regards,
Team.

Closed due to lack of activity.