Skip to content
Ameen Abozaid
Planned lessonJNR-039-L08

Demo: switching Shop to Keycloak-issued tokens

  • Lesson 8 of 8
  • Junior
On This Lesson 3 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

replace self-issued tokens with Keycloak tokens. Prepares JNR-039-LAB1.

Draft outline details

Step by step

  1. Remove the self-issued login endpoint and key from Shop.
  2. Set issuer-uri to the Keycloak realm.
  3. Add a converter that maps realm roles to ROLE_ authorities.
  4. Call the API with a Keycloak token and see 200 for customer and admin as expected.
  5. Planned mistake: sending the ID token to the API. Explain why the audience or claims do not fit, and use the access token.
  6. Confirm an old self-issued token now returns 401.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Type to search levels, phases, modules and lessons.