provider/oauth2: fix aud (Audience) field type which can be a list of… (#6447)
provider/oauth2: fix aud (Audience) field type which can be a list of strings
This commit is contained in:
parent
cc6824fd7c
commit
e191cd6e7f
|
@ -1,6 +1,6 @@
|
||||||
"""id_token utils"""
|
"""id_token utils"""
|
||||||
from dataclasses import asdict, dataclass, field
|
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.db import models
|
||||||
from django.http import HttpRequest
|
from django.http import HttpRequest
|
||||||
|
@ -57,7 +57,7 @@ class IDToken:
|
||||||
# Subject, https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.2
|
# Subject, https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.2
|
||||||
sub: Optional[str] = None
|
sub: Optional[str] = None
|
||||||
# Audience, https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3
|
# 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
|
# Expiration time, https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4
|
||||||
exp: Optional[int] = None
|
exp: Optional[int] = None
|
||||||
# Issued at, https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.6
|
# Issued at, https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.6
|
||||||
|
|
Reference in a new issue