⬆️(django-lasuite) bump to version 0.0.5

Bump the lib to the latest version:
- update the post_get_or_create_user method signature
- allow silent login for OIDC (will require frontend implementation)
This commit is contained in:
Quentin BEY
2025-04-10 14:50:38 +02:00
parent 7a1fc6b626
commit 0220875c70
4 changed files with 7 additions and 3 deletions

View File

@@ -49,13 +49,14 @@ class OIDCAuthenticationBackend(LaSuiteOIDCAuthenticationBackend):
)
return extra_claims
def post_get_or_create_user(self, user, claims):
def post_get_or_create_user(self, user, claims, is_new_user):
"""
Post-processing after user creation or retrieval.
Args:
user (User): The user instance.
claims (dict): The claims dictionary.
is_new_user (bool): Indicates if the user was newly created.
Returns:
- None

View File

@@ -257,7 +257,7 @@ def test_models_oidc_user_getter_invalid_token(django_assert_num_queries, monkey
django_assert_num_queries(0),
pytest.raises(
SuspiciousOperation,
match="User info contained no recognizable user identification",
match="Claims verification failed",
),
):
klass.get_or_create_user(access_token="test-token", id_token=None, payload=None)

View File

@@ -392,6 +392,9 @@ class Base(Configuration):
}
# OIDC - Authorization Code Flow
OIDC_AUTHENTICATE_CLASS = "lasuite.oidc_login.views.OIDCAuthenticationRequestView"
OIDC_CALLBACK_CLASS = "lasuite.oidc_login.views.OIDCAuthenticationCallbackView"
OIDC_CREATE_USER = values.BooleanValue(
default=True,
environ_name="OIDC_CREATE_USER",

View File

@@ -34,7 +34,7 @@ dependencies = [
"django-configurations==2.5.1",
"django-cors-headers==4.7.0",
"django-countries==7.6.1",
"django-lasuite==0.0.2",
"django-lasuite==0.0.5",
"django-oauth-toolkit==3.0.1",
"django-parler==2.3",
"django-redis==5.4.0",