Skip to content

Commit

Permalink
Merge pull request MISP#7230 from jozuatec/patch-2
Browse files Browse the repository at this point in the history
Update OidcAuthenticate.php
  • Loading branch information
JakubOnderka authored Apr 20, 2021
2 parents 655fc61 + 85040d6 commit c25dd70
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ public function authenticate(CakeRequest $request, CakeResponse $response)
if (property_exists($verifiedClaims, $roleProperty)) {
$roles = $verifiedClaims->{$roleProperty};
}
if (empty($roles)) {
$roles = $oidc->requestUserInfo($roleProperty);
}

$this->settings['fields'] = ['username' => 'email'];
$user = $this->_findUser($mispUsername);
Expand Down

0 comments on commit c25dd70

Please sign in to comment.