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

Support for OpenID Connect Auto-Discovery #17

Closed thomasdarimont closed 2 years ago

thomasdarimont commented 2 years ago

Keycloak supports OpenID Connect Discovery which enables automatic client configuration, like the auth endpoint, token endpoint, userinfo endpoint, JWKS endpoint etc.

Keycloak exposes the openid connect discovery document at $AUTH_SERVER_URL/auth/realms/$realm/.well-known/openid-configuration or $ISSUER/.well-known/openid-configuration where issuer is $AUTH_SERVER_URL/auth/realms/$realm.

Here is an example discovery document.

It would be great if this would be supoported. Other oauth/oidc capable libraries like authlib support this feature too (example).

thomasdarimont commented 2 years ago

Closing this as this is already implemented :^) https://github.com/code-specialist/fastapi-keycloak/blob/master/fastapi_keycloak/api.py#L227