Skip to content

Commit

Permalink
Merge pull request #147 from auth0/5.x.x-dev
Browse files Browse the repository at this point in the history
Fix oauth token realm call + exception class name
  • Loading branch information
glena authored Mar 16, 2017
2 parents 415bf49 + f695294 commit 2aff8b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/API/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ public function oauth_token($options = []) {
$options['client_id'] = $this->client_id;
}

if (! isset($options['client_secret'])) {
$options['client_secret'] = $this->client_secret;
}

if (! isset($options['grant_type'])) {
throw new ApiException('grant_type is mandatory');
}
Expand Down
3 changes: 1 addition & 2 deletions src/JWTVerifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct($config) {
}

if (isset($config['suported_algs'])) {
throw new Exception("`suported_algs` was properly renamed to `supported_algs`.");
throw new CoreException("`suported_algs` was properly renamed to `supported_algs`.");
}

if (!isset($config['supported_algs'])) {
Expand Down Expand Up @@ -90,7 +90,6 @@ public function __construct($config) {
*/
public function verifyAndDecode($jwt)
{

$tks = explode('.', $jwt);
if (count($tks) != 3) {
throw new InvalidTokenException('Wrong number of segments');
Expand Down

0 comments on commit 2aff8b8

Please sign in to comment.