allow ppid from accounts token

This commit is contained in:
AJ ONeal 2017-05-24 08:57:52 +00:00
parent 985c65483a
commit 372f633625
1 changed files with 6 additions and 2 deletions

View File

@ -485,14 +485,18 @@
oldSession.token = OAUTH3.jwt.decode(oldSession.access_token).payload;
oldSession.token.sub = oldSession.token.sub || (oldSession.token.acx||{}).id
|| ((oldSession.token.axs||[])[0]||{}).id;
|| ((oldSession.token.axs||[])[0]||{}).appScopedId
|| ((oldSession.token.axs||[])[0]||{}).id
;
oldSession.token.client_uri = clientUri;
oldSession.token.provider_uri = providerUri;
if (oldSession.refresh_token) {
oldSession.refresh = OAUTH3.jwt.decode(oldSession.refresh_token).payload;
oldSession.refresh.sub = oldSession.refresh.sub || (oldSession.refresh.acx||{}).id
|| ((oldSession.refresh.axs||[])[0]||{}).id;
|| ((oldSession.refresh.axs||[])[0]||{}).appScopedId
|| ((oldSession.refresh.axs||[])[0]||{}).id
;
oldSession.refresh.provider_uri = providerUri;
}