{"action":"closed","issue":{"url":"https://api.github.com/repos/UniversalViewer/universalviewer/issues/180","repository_url":"https://api.github.com/repos/UniversalViewer/universalviewer","labels_url":"https://api.github.com/repos/UniversalViewer/universalviewer/issues/180/labels{/name}","comments_url":"https://api.github.com/repos/UniversalViewer/universalviewer/issues/180/comments","events_url":"https://api.github.com/repos/UniversalViewer/universalviewer/issues/180/events","html_url":"https://github.com/UniversalViewer/universalviewer/issues/180","id":115334079,"number":180,"title":"Manifesto needs to use login service @id as key for token storage","user":{"login":"tomcrane","id":1443575,"avatar_url":"https://avatars.githubusercontent.com/u/1443575?v=3","gravatar_id":"","url":"https://api.github.com/users/tomcrane","html_url":"https://github.com/tomcrane","followers_url":"https://api.github.com/users/tomcrane/followers","following_url":"https://api.github.com/users/tomcrane/following{/other_user}","gists_url":"https://api.github.com/users/tomcrane/gists{/gist_id}","starred_url":"https://api.github.com/users/tomcrane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomcrane/subscriptions","organizations_url":"https://api.github.com/users/tomcrane/orgs","repos_url":"https://api.github.com/users/tomcrane/repos","events_url":"https://api.github.com/users/tomcrane/events{/privacy}","received_events_url":"https://api.github.com/users/tomcrane/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/UniversalViewer/universalviewer/labels/manifesto","name":"manifesto","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-05T17:30:10Z","updated_at":"2016-03-13T17:21:59Z","closed_at":"2016-03-13T17:21:59Z","body":"https://github.com/UniversalViewer/universalviewer/blob/master/src/modules/uv-shared-module/BaseExtension.ts#L739\r\n\r\nCurrently manifesto stores the acquired token using the @id of the resource (typically the info.json) it was acquired for. You can retrieve the token with this @id, and also by domain (retrieve a token stored with the same domain).\r\n\r\nIt should store the token with the @id of the login service for the resource, not the @id of the resource itself - a resource may have more than one login service, and login services are likely to be reappear on other resources in the same manifest.\r\n\r\nThe domain fallback is useful in scenarios where the auth services aren't advertised in the manifest, and you want to try the info.json speculatively with a token you already have to avoid two requests. You don't know the @id of the the resource's login service, or even if it has one, but you can send one you do have for the same domain speculatively. So something along those lines should be retained.\r\n\r\n"}}