Yapay zekadan makale özeti
- Kısa
- Ayrıntılı
- Bu video, Hasiben Sy tarafından sunulan bir eğitim içeriğidir. Eğitmen, önceki videoda Java uygulamalarını Keycloak ile entegre ettiyse, bu videoda JavaScript uygulamasını Keycloak SSO ile nasıl entegre edeceğini göstermektedir.
- Video, bir tek sayfalık JavaScript uygulamasını Keycloak SSO ile entegre etme sürecini adım adım anlatmaktadır. Eğitmen, Keycloak'da JavaScript uygulaması için bir uygulama oluşturmayı, JavaScript uygulamasına Keycloak adaptörünü entegre etmeyi, erişim belirteci ve yenileme belirtecini görüntülemeyi ve belirteçlerin yenilenmesini göstermektedir. Ayrıca, uygulamayı Python ile basit bir HTTP sunucusu üzerinde çalıştırma konusuna da değinilmektedir.
- 00:00Introduction to Keycloak Integration with JavaScript Application
- This video demonstrates how to integrate a JavaScript single-page application with Keycloak for access login.
- The application will display token information, including access token and refresh token in JSON Web Token format.
- JavaScript applications use a public client configuration without client credentials, as they are not secure to store client credentials on the frontend.
- 03:35Setting Up Keycloak Client
- A new Keycloak client is created for the JavaScript application with valid redirect URIs and web origins.
- The Keycloak client must be set to public, which is important for frontend applications.
- The application requires a Keycloak.json file and the Keycloak JavaScript adapter to be imported.
- 07:21Implementing Keycloak Integration
- The JavaScript logic for Keycloak integration is implemented, including methods for login, displaying token information, and refreshing tokens.
- Access tokens have a lifespan of five minutes, after which they expire and need to be refreshed using the refresh token.
- The application includes a logout function to end the session.
- 10:15Testing the Integration
- The application redirects to the Keycloak login page where the user can log in with credentials created in the previous Spring application (admin/admin).
- After logging in, the application displays token information including user details, access token, and refresh token.
- The access token refresh functionality is demonstrated, showing how new tokens are generated.
- 13:20Running the Application
- To run the application, a simple HTTP server needs to be set up using Python, as Keycloak understands HTTP protocol but not file system protocol.
- The application is tested by opening the HTML file through the HTTP server.
- The video concludes with a summary of integrating a JavaScript application with Keycloak for access login, token refreshing, and logout functionality.