code-specialist / fastapi-keycloak

Keycloak integration for Python FastAPI
https://fastapi-keycloak.code-specialist.com/
Apache License 2.0
193 stars 50 forks source link

Add attributes to KeycloakUser #21

Closed tchalupnik closed 2 years ago

yannicschroeer commented 2 years ago

Ah! I finally found it: https://www.keycloak.org/docs-api/15.0/rest-api/index.html#_userrepresentation. It's optional, so the Pydantic representation should be so as well

tchalupnik commented 2 years ago

I'm okey with having it as optional, however I am almost sure it will at least be empty dict. Looking on the documentation I see all of these fields are optional which has no sense for me XD Yeah, the reason to have it is the additional users' data provided in custom fields mapped to the attributes field here.