Is it possible to have multiple authsources, i know that simplesamlphp can handle this, but is this possible within the module?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | multiple_authsource-1977748-2.patch | 5.86 KB | sumachaa |
Is it possible to have multiple authsources, i know that simplesamlphp can handle this, but is this possible within the module?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | multiple_authsource-1977748-2.patch | 5.86 KB | sumachaa |
Comments
Comment #1
sumachaa commentedHas anyone tried this?
We are also having similar request;
In the login page, we have 2 links for login
We can configure simplesamlphp with multiple sources; but in the Drupal module; when using the "/saml_login" URL to take the user to the login page, it always take the default Auth Source; which happens from the below line
https://git.drupalcode.org/project/simplesamlphp_auth/-/blob/7.x-3.x/sim...
Whenever the
$_simplesamlphp_auth_asis initiated it uses default value;Is there a way to initiate this depending on different auth source?
Comment #2
sumachaa commentedso a quick fix for this would be:
Assumption
Multiple authsources are setup with SimpleSAMLphp (using authsources.php)
SimpleSAML_Auth_Simpleclass with appropriate authsource/saml_loginpage, pass authsource as query string parameter to the request (SimpleSAMLphp libraray uses the same approach) uses "as" as the query string parameter; example:/saml_login?as=sp1;/saml_login?as=company-sp; Initiate classSimpleSAML_Auth_Simplewith the authsource if present$_SESSIONvariable to keep track of the authsource right after thehook_simplesamlphp_auth_pre_loginsimplesamlphp_auth_unique_idandsimplesamlphp_auth_user_name)Attached a patch with the above items implemented against 7.x-3.x-dev branch