* MarcF <
marcus....@gmail.com> [2015-05-21 13:12]:
> IdP initiated login now works, however when I do SP initiated login, the
> discovery service appears asking me to select the IdP.
That's the point of an IDP Discovery Service, of course.
> Obviously customers should not be able to choose another customer's
> IdP
Well, of you were not equating hostname with customer (probably in
order to avoid discovery in the first place, by making it impossible
for your customers to just access a well-known service URL and let
them login from there), and again equating IDP selection with
authorization in the application, this issue wouldn't exist.
> How do I initiate a login to a specific IdP?
> I've tried the following with no luck:
>
> $as = new SimpleSAML_Auth_Simple($_SERVER['HTTP_HOST']);
>
> if (!$as->isAuthenticated()) {
> $params = array(
> 'ErrorURL' => "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]",
> 'ReturnTo' => "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]",
> 'idp' => $samlEntityID, //$samlEntityID is the IdP's entityID for this
> customer - looked up in the database for the subdomain
> );
> $as->login($params);
> }
The documentation (section 2, Parameters)
https://simplesamlphp.org/docs/stable/saml:sp
says it's "saml:idp". cf. Example 5.7 at the end.
-peter