Skip to content

Instantly share code, notes, and snippets.

@daneb
Last active December 22, 2021 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daneb/50927d40ee5255f92e037e5d05996327 to your computer and use it in GitHub Desktop.
Save daneb/50927d40ee5255f92e037e5d05996327 to your computer and use it in GitHub Desktop.
process_identity_server_token $response
# I see the locale visible in the token but then it disappears
# error_log("[777] Before Prepared Decoded Token: " . print_r($decoded, true));
# $valid_token_data = $this->prepare_token($decoded, $user->ID);
(
[data] => stdClass Object
(
[user] => stdClass Object
(
[id] => 224175
)
[locale] => en
[options] => stdClass Object
(
[skipSalesForm] =>
[isAdminQA] =>
)
)
[iss] => https://host.docker.internal:5005
[iat] => 1640197377
[nbf] => 1640197377
[exp] => 1640802177
)
# $response = new \WP_REST_Response($token);
# error_log('[777] Token Response: ' . print_r($response, true));
# $response->header('ab-sso-set-language', $token['locale']);
(
[links:protected] => Array
(
)
[matched_route:protected] =>
[matched_handler:protected] =>
[data] => Array
(
[profile] => Array
(
[id] => 224175
[username] => rmandru@alphacanada.org
[name] => Ngwari Mandrup
[first_name] => Ngwari
[last_name] => Mandrup
[email] => rmandru@alphacanada.org
[role_at_church] =>
[role_at_alpha] =>
[user_roles] => Array
(
)
[url] =>
[description] =>
[nickname] => pnmandrup@gmail.com
[slug] => pnmandrupgmail-com
[registered_date] => 2020-04-24T21:23:41+00:00
[mobileNumber] =>
[intlNumber] =>
[birthday] =>
[noOrganization] => 1
[contactId] =>
[accountId] =>
[alphaStats] => Array
(
[numberAllTime] => 0
[numberYouth] => 0
[numberRegular] => 0
[numberActive] => 0
[numberUpcoming] => 0
[numberOpen] => 0
[currentProductName] =>
[activeAlphas] => Array
(
)
[upcomingAlphas] => Array
(
)
[openAlphas] => Array
(
)
[nextStartDate] =>
[nextEndDate] =>
[recentStartDate] =>
[recentEndDate] =>
[allProducts] => Array
(
)
[activeProducts] => Array
(
)
)
[preferences] => Array
(
[notifications] => Array
(
[subscriptionType] => some
[subscriptions] => Array
(
[0] => Array
(
[label] => Weekly Session Emails
[id] => weekly-sessions
[auto_optin] => 1
[selected] => 1
)
[1] => Array
(
[label] => General Updates
[id] => marketing-updates
[auto_optin] =>
[selected] =>
)
)
)
)
[isTeamMember] =>
[locality] =>
[country] => ca
[city] =>
)
[organization] =>
[token] => eyJhbGciOiJSUzI1NiIsImtpZCI6IjY2RkU5MURFQ0RFRDA4MDMxNDhENEU4MEE0Q0MxQkZEIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2hvc3QuZG9ja2VyLmludGVybmFsOjUwMDUiLCJuYmYiOjE2NDAxOTczNzcsImlhdCI6MTY0MDE5NzM3NywiZXhwIjoxNjQwODAyMTc3LCJzY29wZSI6WyJvcGVuaWQiLCJwcm9maWxlIl0sImFtciI6WyJwd2QiXSwiY2xpZW50X2lkIjoiYWJfZGV2X2NsaWVudCIsInN1YiI6IjEiLCJhdXRoX3RpbWUiOjE2NDAxOTczNzIsImlkcCI6ImxvY2FsIiwicHJlZmVycmVkX3VzZXJuYW1lIjoicmFqYSIsInVuaXF1ZV9uYW1lIjoicmFqYSIsImxvY2FsZSI6ImVuIiwibmFtZSI6IlJhamEiLCJsYXN0X25hbWUiOiJ0ZXN0IiwiZW1haWwiOiJybWFuZHJ1QGFscGhhY2FuYWRhLm9yZyIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJzaWQiOiJDRTMwQTM5NzdDRjZFRENENjRDQzE5MjFGM0M5MjJFNSJ9.bSWTbl7Cm_Jt5mvsL-PzTcehoNde_15afXqVDW1XJZDiS_FTnCsYG3cg6SWoJNuQJu_grmGwnY4yu1bGjFnLW5_Vk3DGw5Bh4KzMHF5zo9ikqlUF3eYpsYX9jBkNz_tXsftt-12x0HiA7WMojTdkBl8o-k4XBXIVuzfkGJJ6P57-BFGGUu6jEqnPu_HQqMxND1HlgRzeXaWhVSdNQHFDWKDDRbY1Qkc6No3K_D9IXYuxR2kwPWzmOSRFYauleIwRIZx2RsLJDq-kZyquDh4VrgBk3LS5IdgdkHOmH_mDq7mKyd7ipKfjHBYqVXDglpZa0fQjV7rz9NOZY-aeaRI-Cw
[twofa] =>
)
[headers] => Array
(
)
[status] => 200
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment