Design idea: lazy server client initialization
Right now the django_auth_oidc.auth.server instance is being created on import time. OIDC client initialization requires HTTP request in order to succeed. This means that it can fail and in result stop whole Django application from starting.
It means that if OIDC Provider is unavailable the application cannot start. It makes also development a bit uncomfortable. If I work with packages in editable mode it sometimes happens that both Provider and Client are realoded at the same time. Maybe we could consider some improvements:
- initialisation on first access
- retries of failed initialisation on following access attempts
- configurable persitent/semi-persitent caching of
.well-known/openid-configuration