Skip to content

Commit a6a4824

Browse files
Add support for domain_hint
When "mailRestriction" is set, the "domain_hint" URI parameters shows only currently logged in accounts that belongs to the domain specified if user is connected to multiple Azure accounts of different domains.
1 parent 2f1c638 commit a6a4824

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Azure.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@ public function getEndpoint(string $endpoint)
6161
/** @inheritdoc */
6262
public function getAuthorizationEndpoint()
6363
{
64-
return new Uri($this->getEndpoint(self::ENDPOINT_AUTH));
64+
global $conf;
65+
$uri = new Uri($this->getEndpoint(self::ENDPOINT_AUTH));
66+
if (isset($conf['plugin']['oauth']['mailRestriction'])) {
67+
$uri->addToQuery('domain_hint', substr($conf['plugin']['oauth']['mailRestriction'], 1));
68+
}
69+
return $uri;
6570
}
6671

6772
/** @inheritdoc */

0 commit comments

Comments
 (0)