简体   繁体   中英

How to redirect to the first configured login module in authsource when I access the SimpleSAMLphp core login page?

I'm setting up a SimpleSAMLphp server as IdP. In my authsources.php I have configured 3 auth modules: multiauth:MultiAuth , saml:SP and a custom one based on SQLAuth module.

When I access the default simplesamlphp login page: examample.com/simplesaml/module.php/core/login I'm presented withe the 3 auth options.

What I want is when I access that login page,it should redirect to one of the modules login page directly, for example to multiauth:MultiAuth which is /multiauth/selectsource.php

I can't redirect directly because it asks for an AuthState parameter, this is my problem.

In metadata/saml20-idp-hosted.php , you need to supply an auth paramater which specifies the authentication source you wish you use for the IdP, ie if you've defined a multiauth:MultiAuth authentication source in config/authsources.php as in the example for that module :

'example-multi' => array(
    'multiauth:MultiAuth',
    ...

then for your IdP your metadata/saml20-idp-hosted.php should include something like:

'__DYNAMIC:1__' => [
  'host' => '__DEFAULT__',
  'privatekey' => 'example.org.pem',
  'certificate' => 'example.org.crt',
  'auth' => 'example-multi',
],

This will specify the default authentication source for this IdP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM