Skip to content

Commit 136f1b8

Browse files
author
Robert Wittman
committed
Changed variable to static
1 parent a3ebb80 commit 136f1b8

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

examples/authentication_no_strict.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@
3030
exit();
3131
}
3232

33-
echo $accessToken; // 53e20e750c89274d02b53927135fd664
33+
echo $accessToken->access_token; // 53e20e750c89274d02b53927135fd664
34+
echo $accessToken->scope; // read_products
3435
}

examples/strict_authentication.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
exit();
5050
}
5151

52-
echo $accessToken; // 53e20e750c89274d02b53927135fd664
52+
echo $accessToken->access_token; // 53e20e750c89274d02b53927135fd664
53+
echo $accessToken->scope; // read_products
5354
}
5455

5556

lib/Auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static function accessToken()
5454
if(\Shopify\Shopify::strict())
5555
{
5656
if( is_null( self::$nonce ) ) throw new \Exception('No nonce was set. use Auth::setNonce($nonce) to set one');
57-
if( !self::checkNonce( $nonce ) ) throw new \Exception("Authentication nonce failed verification");
57+
if( !self::checkNonce( self::$nonce ) ) throw new \Exception("Authentication nonce failed verification");
5858
if( !\Shopify\Shopify::validateHmac() ) throw new Exception\ApiException("HMAC signature failed verification");
5959
}
6060
return \Shopify\AccessToken::createFromCode($_GET['code']);

0 commit comments

Comments
 (0)