summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2020-12-31 09:24:02 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2020-12-31 09:24:02 +0900
commiteef307a7bdb141b671058e2214e68d0fd27866f1 (patch)
tree8d6048440bd2eefed9aaceda5707738c877d6404
parent632f7a37b006467db749ee7a77506a417cdf210c (diff)
downloadwoocommerce-taler-eef307a7bdb141b671058e2214e68d0fd27866f1.tar.gz
woocommerce-taler-eef307a7bdb141b671058e2214e68d0fd27866f1.tar.bz2
woocommerce-taler-eef307a7bdb141b671058e2214e68d0fd27866f1.zip
fix
-rw-r--r--snippets/oidc-woocommerce.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/snippets/oidc-woocommerce.php b/snippets/oidc-woocommerce.php
index 2731728..bdb4fdc 100644
--- a/snippets/oidc-woocommerce.php
+++ b/snippets/oidc-woocommerce.php
@@ -66,24 +66,24 @@ add_filter(
* @return True if a reference was found
*/
function get_claim( $claimname, $userinfo, &$claimvalue ) {
- if ( ! isset( $token_response ) ) {
+ if ( ! isset( $userinfo ) ) {
return False;
}
/**
* If we find a simple claim, return it.
*/
- if ( array_keys_exists( $claimname, $token_response ) ) {
- $claimvalue = $token_response[$claimname];
+ if ( array_keys_exists( $claimname, $userinfo ) ) {
+ $claimvalue = $userinfo[$claimname];
return True;
}
/**
* If there are not aggregated claims, it is over.
*/
- if ( ! array_key_exists( '_claim_names', $token_response ) ||
- ! array_key_exists( '_claim_sources', $token_response ) ) {
+ if ( ! array_key_exists( '_claim_names', $userinfo ) ||
+ ! array_key_exists( '_claim_sources', $userinfo ) ) {
return False;
}
- $claim_src_ptr = $token_response['_claim_names'];
+ $claim_src_ptr = $userinfo['_claim_names'];
if ( ! isset( $claim_src_ptr ) ) {
return False;
}
@@ -95,7 +95,7 @@ function get_claim( $claimname, $userinfo, &$claimvalue ) {
}
$src = $claim_src_ptr[$claimname];
//Reference found, but no corresponding JWT. This is a malformed userinfo
- if ( ! array_key_exists( $src, $token_response['_claim_sources']) ) {
+ if ( ! array_key_exists( $src, $userinfo['_claim_sources']) ) {
return False;
}
//Source claim is not a JWT. Abort.