Use generic Consent.consent_id instead of LDAP Consent.cn attribute

This commit is contained in:
Éloi Rivard 2023-05-17 08:54:13 +02:00
parent a7013f2360
commit b346b0db8a
4 changed files with 5 additions and 5 deletions

View file

@ -119,7 +119,7 @@ def revoke_preconsent(user, client_id):
) )
consent = Consent( consent = Consent(
cn=str(uuid.uuid4()), consent_id=str(uuid.uuid4()),
client=client, client=client,
subject=user, subject=user,
scope=client.scope, scope=client.scope,

View file

@ -149,7 +149,7 @@ def authorize():
).split(" ") ).split(" ")
else: else:
consent = Consent( consent = Consent(
cn=str(uuid.uuid4()), consent_id=str(uuid.uuid4()),
client=client, client=client,
subject=user, subject=user,
scope=scopes, scope=scopes,

View file

@ -195,7 +195,7 @@ def id_token(testclient, client, user, slapd_connection):
@pytest.fixture @pytest.fixture
def consent(testclient, client, user, slapd_connection): def consent(testclient, client, user, slapd_connection):
t = Consent( t = Consent(
cn=str(uuid.uuid4()), consent_id=str(uuid.uuid4()),
client=client, client=client,
subject=user, subject=user,
scope=["openid", "profile"], scope=["openid", "profile"],

View file

@ -605,7 +605,7 @@ def test_authorization_code_flow_but_user_cannot_use_oidc(
def test_prompt_none(testclient, logged_user, client): def test_prompt_none(testclient, logged_user, client):
consent = Consent( consent = Consent(
cn=str(uuid.uuid4()), consent_id=str(uuid.uuid4()),
client=client, client=client,
subject=logged_user, subject=logged_user,
scope=["openid", "profile"], scope=["openid", "profile"],
@ -632,7 +632,7 @@ def test_prompt_none(testclient, logged_user, client):
def test_prompt_not_logged(testclient, user, client): def test_prompt_not_logged(testclient, user, client):
consent = Consent( consent = Consent(
cn=str(uuid.uuid4()), consent_id=str(uuid.uuid4()),
client=client, client=client,
subject=user, subject=user,
scope=["openid", "profile"], scope=["openid", "profile"],