wellcomecollection / platform

Wellcome Collection Digital Platform
https://developers.wellcomecollection.org/
MIT License
48 stars 10 forks source link

Transform V1 and V2 Auth services into the same shape #5759

Closed gestchild closed 2 months ago

gestchild commented 3 months ago

Relates to https://github.com/wellcomecollection/platform/issues/5747 and Relates to https://github.com/wellcomecollection/platform/issues/5755

Our iiif manifests can contain auth V1 and auth V2 services, or just auth v1 services (they need to be recently generated to have the v2 services). We want to move to using V2 but can't guarantee all manifests will include them, so we will need to attempt to use V2 and fallback to V1.

After we retrieve the services on the manifest, we should transform them both into the same shape before using them. This will make falling back from one to the other easier.