Skip to content

Commit

Permalink
Replace serialize with json_encode in demo
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximilianKresse committed Nov 20, 2020
1 parent f1e0af8 commit e3842a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/demo.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
// alternativly you can remember you last access token
// this is a simple example using the file system. redis or memcache may be a better solution
//if (file_exists(__DIR__ . '/token')) {
// $token = unserialize(file_get_contents(__DIR__ . '/token'), ['allowed_classes' => false]);
// $token = json_decode(file_get_contents(__DIR__ . '/token'), true);
//}
//if (!isset($token, $token['accessToken'], $token['expires']) || $token['expires'] < (time() - 60)) {
// $token = $azureModule->createTokenBySharedSecret($tenantId, $appClientId, $appClientSecret);
// file_put_contents(__DIR__ . '/token', serialize($token));
// file_put_contents(__DIR__ . '/token', json_encode($token, JSON_PRETTY_PRINT));
//}
$azureModule->setAccessToken($token['accessToken']);

Expand Down

0 comments on commit e3842a8

Please sign in to comment.