Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Access Token audience #273

Merged
merged 2 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spid_cie_oidc/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.1.0"
__version__ = "1.1.1"
5 changes: 3 additions & 2 deletions spid_cie_oidc/provider/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from django.conf import settings
from pydantic import ValidationError
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.utils import timezone
import urllib
from spid_cie_oidc.entity.jwtse import create_jws, unpad_jwt_head, unpad_jwt_payload, verify_jws
Expand Down Expand Up @@ -245,11 +246,11 @@ def get_jwt_common_data(self):
def get_access_token(
self, iss_sub:str, sub:str, authz: OidcSession, commons:dict
) -> dict:

access_token = {
"iss": iss_sub,
"sub": sub,
"aud": [authz.client_id],
"aud": [iss_sub, reverse("oidc_provider_userinfo_endpoint")],
"client_id": authz.client_id,
"scope": authz.authz_request["scope"],
"jti": str(uuid.uuid4())
Expand Down