mirror of https://github.com/MISP/MISP
Merge pull request #9694 from christianmg99/set-oidc-issuer
chg: [config] Set Oidc issuerpull/9701/head
commit
f5f838f3f3
|
@ -302,9 +302,10 @@ class Oidc
|
||||||
$providerUrl = $this->getConfig('provider_url');
|
$providerUrl = $this->getConfig('provider_url');
|
||||||
$clientId = $this->getConfig('client_id');
|
$clientId = $this->getConfig('client_id');
|
||||||
$clientSecret = $this->getConfig('client_secret');
|
$clientSecret = $this->getConfig('client_secret');
|
||||||
|
$issuer = $this->getConfig('issuer', $providerUrl);
|
||||||
|
|
||||||
if (class_exists("\JakubOnderka\OpenIDConnectClient")) {
|
if (class_exists("\JakubOnderka\OpenIDConnectClient")) {
|
||||||
$oidc = new \JakubOnderka\OpenIDConnectClient($providerUrl, $clientId, $clientSecret);
|
$oidc = new \JakubOnderka\OpenIDConnectClient($providerUrl, $clientId, $clientSecret, $issuer);
|
||||||
} else if (class_exists("\Jumbojett\OpenIDConnectClient")) {
|
} else if (class_exists("\Jumbojett\OpenIDConnectClient")) {
|
||||||
throw new Exception("Jumbojett OIDC implementation is not supported anymore, please use JakubOnderka's client");
|
throw new Exception("Jumbojett OIDC implementation is not supported anymore, please use JakubOnderka's client");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -32,6 +32,7 @@ $config = array(
|
||||||
...
|
...
|
||||||
'OidcAuth' = [
|
'OidcAuth' = [
|
||||||
'provider_url' => '{{ OIDC_PROVIDER }}',
|
'provider_url' => '{{ OIDC_PROVIDER }}',
|
||||||
|
'issuer' => '{{ OIDC_ISSUER }}', // If omitted, it defaults to provider_url
|
||||||
'client_id' => '{{ OIDC_CLIENT_ID }}',
|
'client_id' => '{{ OIDC_CLIENT_ID }}',
|
||||||
'client_secret' => '{{ OIDC_CLIENT_SECRET }}',
|
'client_secret' => '{{ OIDC_CLIENT_SECRET }}',
|
||||||
'role_mapper' => [ // if user has multiple roles, first role that match will be assigned to user
|
'role_mapper' => [ // if user has multiple roles, first role that match will be assigned to user
|
||||||
|
|
Loading…
Reference in New Issue