Skip to content

Commit

Permalink
Fix for #29
Browse files Browse the repository at this point in the history
  • Loading branch information
hajekj committed Jan 30, 2017
1 parent 4581c2e commit 5af73c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Token/AccessToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ public function __construct(array $options = [], $provider)
}
else {
// The id_token is unsigned (coming from v1.0 endpoint) - https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx
// Validate the access_token signature first by parsing it as JWT into claims
$accessTokenClaims = (array)JWT::decode($options['access_token'], $keys, ['RS256']);

// Since idToken is not signed, we just do OAuth2 flow without validating the id_token
// // Validate the access_token signature first by parsing it as JWT into claims
// $accessTokenClaims = (array)JWT::decode($options['access_token'], $keys, ['RS256']);
// Then parse the idToken claims only without validating the signature
$idTokenClaims = (array)JWT::jsonDecode(JWT::urlsafeB64Decode($tks[1]));
}
Expand Down

0 comments on commit 5af73c0

Please sign in to comment.