Skip to content

Commit

Permalink
fix: private jwks in entity model auto list, closes #248
Browse files Browse the repository at this point in the history
  • Loading branch information
peppelinux committed Dec 21, 2022
1 parent a811171 commit db2044d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spid_cie_oidc/entity/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,15 @@ def entity_configuration_as_jws(self, **kwargs):
**kwargs,
)

def set_jwks_as_array(self):
for i in ('jwks_fed','jwks_core'):
value = getattr(self, i)
if not isinstance(value, list):
setattr(self, i, [value])

def save(self, *args, **kwargs):
self.entity_type = self.type[0]
self.set_jwks_as_array()
super().save(*args, **kwargs)

def __str__(self):
Expand Down

0 comments on commit db2044d

Please sign in to comment.