From e191cd6e7fc4a480ed3de2622c780566675ff821 Mon Sep 17 00:00:00 2001 From: Jean-Michel DILLY <48059109+jmdilly@users.noreply.github.com> Date: Tue, 1 Aug 2023 23:16:26 +0200 Subject: [PATCH] =?UTF-8?q?provider/oauth2:=20fix=20aud=20(Audience)=20fie?= =?UTF-8?q?ld=20type=20which=20can=20be=20a=20list=20of=E2=80=A6=20(#6447)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit provider/oauth2: fix aud (Audience) field type which can be a list of strings --- authentik/providers/oauth2/id_token.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/authentik/providers/oauth2/id_token.py b/authentik/providers/oauth2/id_token.py index 3d5c9544e..b51116f8d 100644 --- a/authentik/providers/oauth2/id_token.py +++ b/authentik/providers/oauth2/id_token.py @@ -1,6 +1,6 @@ """id_token utils""" from dataclasses import asdict, dataclass, field -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any, Optional, Union from django.db import models from django.http import HttpRequest @@ -57,7 +57,7 @@ class IDToken: # Subject, https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.2 sub: Optional[str] = None # Audience, https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3 - aud: Optional[str] = None + aud: Optional[Union[str, list[str]]] = None # Expiration time, https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4 exp: Optional[int] = None # Issued at, https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.6