Closed dennismeissner closed 4 years ago
@dennismeissner,
Good question!
Each IdP you configure has a unique request login endpoint. When you hit this login request endpoint, the plugin initiates the SSO process. You can use logic in the config/general.php
to conditionally switch IdPs, something like so:
return [
// Global settings
'*' => [
'loginPath' => (
// OR use $_REQUEST['HTTP_HOST'] (or alternative) if BASE_URL isn't an environmental variable
strpos('site-1234', getenv('BASE_URL')) ?
'/sso/login/request/5fe363cd-d166-4758-bc88-634613bf0396' :
'/sso/login/request/<uid-for-siteabc>'
),
],
];
You can find the UID based login request path under the IdP config settings in the admin.
dude, thanks again for your fast help. This is very much what i was looking for!
Until now, i only had one single IDP, but i have to implement a second IDP which is no problem using your interface.
What i am looking for is a solution for the default loginPath. e.g. if someone accesses my Site using domain: site-123.com i want send him to the idp configured as
idp.site-123.com
if he comes on my site using domain: site-abc.com i want to send him to the idp configured as
idp.site-abc.com
@dsmrt do you see any solution to this specific issue?
it is maybe as simple as (pseudo):
but i need to find the best place to handle this. any suggestions?