Skip to content

Commit

Permalink
Merge pull request #109 from sadika9/patch-1
Browse files Browse the repository at this point in the history
Validate v2.0 token app id (azp)
  • Loading branch information
hajekj authored Jul 4, 2020
2 parents 9275c97 + f9d635c commit 0d28aaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Provider/Azure.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public function validateAccessToken($accessToken)
* @return void
*/
public function validateTokenClaims($tokenClaims) {
if ($this->getClientId() != $tokenClaims['aud'] && $this->getClientId() != $tokenClaims['appid']) {
if ($this->getClientId() != $tokenClaims['aud']) {
throw new \RuntimeException('The client_id / audience is invalid!');
}
if ($tokenClaims['nbf'] > time() || $tokenClaims['exp'] < time()) {
Expand Down

0 comments on commit 0d28aaa

Please sign in to comment.