All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Security update for
python-jose
from version3.3.0
to3.4.0
- 'Origin' header should NOT be present if the Azure app is not a SPA.
- Explicit compatibility with django 5.1
- Fix a migration error from version
1.1.0
on a non-empty database (gitlab #26).
- Explicit compatibility with django 5.1
- Security package upgrades
- Azure tenant PKCE public app fix (Origin header was missing)
- Final fix for mysql on InnoDB with max key of 3072 by having the constraint as a lonely migration (github #21). Thanks Jurymax99 for the suggested merge request.
- Allow to logout even when using the Django
ModelBackend
(github #25)
- Do not send the client secret, even if defined, with
PKCE
by default (github #18) This can be overriden with theOIDC_RP_FORCE_SECRET_WITH_PKCE
parameter. - Gitlab CI upgrades
- redirect after total logout could happen with a GET (#10)
- allow empty client secret (QE-625, gitlab #9)
- User logged in signal doc example, thanks @pinoatrome (github #16)
- Drop python 3.7, support python 3.12 and django 5
- Fix timestamp-awareness inside
RefreshSession
andRefreshAccessToken
middlewares
- Each log (debug, warning, error) is now correctly bound to the module name.
- Mypy 1.0
- Added documentation and changelog urls for PyPI
- Default value for
jwks
inBearerAuthenticationBackend
should be dict, not a list. - Fix blacklist expiration for token where seconds where used as hours
- Fix
_clear_cache
method inCacheBaseView
: was not clearing the session correctly. - Configuration cannot be updated when using unit tests. This is now fixed. No impact on lib usage.
- Respect the optional
fail
parameter of@login_required
decorator. - Middlewares should not inherit depraceted
MiddlewareMixin
. - If user does not exist on request, should not crash in
Oauth2MiddlewareMixin.is_oidc_enabled
.
- Allow to override
MIN_SECONDS
inRefreshSessionMiddleware
. - Use UTC time in
RefreshAccessTokenMiddleware
,RefreshSessionMiddleware
.
LoginRequiredMiddleware
- Documentation about
@login_required
pytz
removed.datetime.timezone.utc
is the only thing required.
- urls listed in
OIDC_MIDDLEWARE_NO_AUTH_URL_PATTERNS
will not be tried on authentication inauth.py
- Allow to specify
userinfo
andid_token
individual claims to get along with the id token request if the OP supports it (Eric Plaster, mr !12).
OIDC_EXTEND_USER
callable can now takes arequest
andaccess_token
as additional arguments (compatibility is assured).- Migrate can raise an
IntegrityError
(ticket #7). - All parameters that accept a function can also accept a dotted string to import the function.
- Migrate from
pipenv
topoetry
system.
- Missing Django migration
- Allow Django 4.1+ (but not 5.0)
- Add Python 3.11 in classifier
- Dependencies upgrade
- Allow usage with Django 4.0 and update classifiers
- Make the code compatible with Python 3.7
- Allow to scramble the password only when creating an account instead of each SSO connection/renewal
- Allow
user
extension with a callable usingclaims
- User
email
field was filled with rawemail
value instead of actual value ifOIDC_EMAIL_CLAIM
was not set.
- No error 500 on expired authentication because the database session might not be found
- Prevent infinite redirect to authenticate view when using any middleware (session was not cleared properly)
- Use
Authorization
header forUSERINFO
instead of request param token
field inBlacklistedToken
table changed fromTextField
toCharField(max_length=15000)
for MySql compatibility
- register json web keys to session only if not already registered
- fix error handling by adding required method parameter
email
,first_name
andlast_name
cannot be None. Fallback to empty string.- correctly check for status code ok when getting access token.
- fix doc about
SESSION_COOKIE_SECURE
- fix typo in f-string
- OP.md with settings examples for multiple OIDC Providers
- Management commands were not included in the package
Initialize library