Skip to content

Commit

Permalink
fix: added provider_id in pairwise func
Browse files Browse the repository at this point in the history
  • Loading branch information
peppelinux committed May 7, 2022
1 parent 93b6e39 commit de9ba44
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spid_cie_oidc/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.0"
__version__ = "0.7.1"
4 changes: 2 additions & 2 deletions spid_cie_oidc/provider/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def revoke(self, destroy_session=True):
iss_tokens.update(revoked=True)
self.save()

def pairwised_sub(self):
def pairwised_sub(self, provider_id:str):
return hashlib.sha256(
f"{self.user_uid}{self.client_id}{OIDCFED_PROVIDER_SALT}".encode()
f"{self.user_uid}{self.client_id}{provider_id}{OIDCFED_PROVIDER_SALT}".encode()
).hexdigest()

def public_sub(self):
Expand Down
2 changes: 1 addition & 1 deletion spid_cie_oidc/provider/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def get_refresh_token(
return refresh_token

def get_iss_token_data(self, session : OidcSession, issuer: FederationEntityConfiguration):
_sub = session.pairwised_sub()
_sub = session.pairwised_sub(provider_id = issuer.sub)
iss_sub = issuer.sub
commons = self.get_jwt_common_data()
jwk = issuer.jwks_core[0]
Expand Down

0 comments on commit de9ba44

Please sign in to comment.