Skip to content

Commit

Permalink
Bugfix: \ for RuntimeException
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBabaYaga authored Dec 7, 2017
1 parent b3b5aad commit cd80a9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Provider/Azure.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,25 +237,25 @@ public function validateAccessToken($accessToken)
$tokenClaims = (array)JWT::decode($accessToken, $keys, ['RS256']);

if($this->getClientId() != $tokenClaims['aud']) {
throw new RuntimeException("The audience is invalid!");
throw new \RuntimeException("The audience is invalid!");
}
if($tokenClaims['nbf'] > time() || $tokenClaims['exp'] < time()) {
// Additional validation is being performed in firebase/JWT itself
throw new RuntimeException("The id_token is invalid!");
throw new \RuntimeException("The id_token is invalid!");
}

if($this->tenant == "common") {
$this->tenant = $tokenClaims['tid'];

$tenant = $this->getTenantDetails($this->tenant);
if($tokenClaims['iss'] != $tenant['issuer']) {
throw new RuntimeException("Invalid token issuer!");
throw new \RuntimeException("Invalid token issuer!");
}
}
else {
$tenant = $this->getTenantDetails($this->tenant);
if($tokenClaims['iss'] != $tenant['issuer']) {
throw new RuntimeException("Invalid token issuer!");
throw new \RuntimeException("Invalid token issuer!");
}
}

Expand Down

0 comments on commit cd80a9b

Please sign in to comment.