عرض عملي: تحويل Shop إلى رموز صادرة من Keycloak
في هذا الدرس 3 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
replace self-issued tokens with Keycloak tokens. Prepares JNR-039-LAB1.
تفاصيل المخطط المبدئي
خطوة بخطوة
- Remove the self-issued login endpoint and key from Shop.
- Set
issuer-urito the Keycloak realm. - Add a converter that maps realm roles to
ROLE_authorities. - Call the API with a Keycloak token and see
200for customer and admin as expected. - Planned mistake: sending the ID token to the API. Explain why the audience or claims do not fit, and use the access token.
- Confirm an old self-issued token now returns 401.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.