From 372f633625d6a2f294c787941defeccc087a2a70 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 24 May 2017 08:57:52 +0000 Subject: [PATCH] allow ppid from accounts token --- oauth3.core.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/oauth3.core.js b/oauth3.core.js index a2023f6..ea00f3d 100644 --- a/oauth3.core.js +++ b/oauth3.core.js @@ -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; }