Well explained. So, wich attribute refer to user agent ? I'm trying to customize the sessions responses returned by default. I'm using django, drf and python-keycloak
@iotstation74723 ай бұрын
Hi, Thank you for the comment.Basically Keycloak doesn't provide a specific user attribute for the 'User-Agent' by default. The User-Agent usually refers to the client software (like a browser or mobile app) making the request. You have a couple of options: You can create a custom attribute in Keycloak for the User-Agent. Alternatively, since you're using Django, you can access the User-Agent via the Django request object (request.META['HTTP_USER_AGENT']). You can then pass this information to Keycloak as a custom claim when authenticating or updating sessions."
@gmisir2 ай бұрын
Very good presentation! Where could I find the data models for users, clients and other object?
@iotstation74722 ай бұрын
Hi. Thank you for the comment. Actually i didnt understand the question but i can guide you to the documentation of keycloak which is the best reference, in case you need more information please provide me more details. www.keycloak.org/docs-api/latest/javadocs/index.html www.keycloak.org/docs/latest/server_admin/index.html
@gunasekaran74257 ай бұрын
Hi sir I'm using vue 3 project, I'm hit the keycloak rest api, cors error occurred, but hit from python project, cors error not occurred, how to solve cors error during call rest api
@iotstation74727 ай бұрын
Thank you for the comment. Here’s my recommendation:Go to the Keycloak admin console. Under the relevant client settings, set Web Origins to * or specify your frontend URL (e.g., localhost:8080).You can also define a proxy in your vue.config.js and provide the Keycloak address.This configuration allows your frontend to make cross-origin requests to the Keycloak API, resolving the CORS error. Let me know if you need more help. Good luck!
@timapigolev16405 ай бұрын
i don't see my new attribute in userinfo endpoint. :(
@edgareduardovegaruiz21264 ай бұрын
do you solve that? how? i'm same
@timapigolev16404 ай бұрын
@@edgareduardovegaruiz2126 yes i'm. U need add New scope to client, and then add mapper to this scope. Choose type mapper "user attribute" and enter name of New attribute.