italia / spid-cie-oidc-django

The SPID/CIE OIDC Federation SDK, written in Python
Apache License 2.0
27 stars 28 forks source link

[Feat] Proxy function to get cached Entity Statements in Metadata discovery #41

Open peppelinux opened 2 years ago

peppelinux commented 2 years ago

We need that all the trust chains and statements validations/operations must be independent from django framework.

This way the code can be used/imported as it is even in a different python framework.

at the same time we MAY support the resuse of already cached statements, instead of download them each time.

this can be done in two different way:

  1. pass all the cached entries as argument -> bad
  2. create and dynamically import a proxy function that queries the django ORM. This function can be configured as a string in a general setting and imported dynamicall runtime -> good

with the second choice we'll get all the statements on each occurence