Skip to content
Snippets Groups Projects
Commit 5b115527 authored by Chris Beer's avatar Chris Beer
Browse files

Allow manifesto to look for full service profile data on other parts of the manifest

parent 15047693
No related branches found
No related tags found
No related merge requests found
......@@ -115,7 +115,10 @@ export function* fetchManifest({ manifestId }) {
/** @private */
function* getAccessTokenService(resource) {
const services = Utils.getServices({ ...resource, options: {} }).filter(s => s.getProfile().match(/http:\/\/iiif.io\/api\/auth\//));
const manifestoCompatibleResource = resource && resource.__jsonld
? resource
: { ...resource, options: {} };
const services = Utils.getServices(manifestoCompatibleResource).filter(s => s.getProfile().match(/http:\/\/iiif.io\/api\/auth\//));
if (services.length === 0) return undefined;
const accessTokens = yield select(getAccessTokens);
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment