0

我安装了 SimpleSAMLPHP 并在 authsources.php 中创建了一个这样的 SQL 登录源:

$config = array(
    'admin' => array(
        'core:AdminPassword',
    ),
    'myLogin-sql' => array(
        'sqlauth:SQL',
        'dsn' => 'mysql:host=localhost;port=3306;dbname=myDB',
        'username' => 'myUserName',
        'password' => 'myPasWord',
        'query' => '
            SELECT * FROM users 
            WHERE user_username = :username 
            AND user_code = (SELECT PASSWORD(:password)) 
            AND user_active=1',
    ),
);

然后我在 saml20-idp-hosted.php 中指定了标识提供程序以使用我的源,如下所示:

$metadata['__DYNAMIC:1__'] = array(
    'host' => '__DEFAULT__',
    'privatekey' => 'myWebiste.com.pem',
    'certificate' => 'myWebsite.com.crt',
    'auth' => 'myLogin-sql',
};

查询肯定有效,所以我知道这不是问题。然而,当我在 SugarCRM 中打开它时,它说找不到活页夹:

SimpleSAML_Error_Error: UNHANDLEDEXCEPTION
Backtrace:
1 /home/public_html/sso/www/_include.php:37 (SimpleSAML_exception_handler)
0 [builtin] (N/A)
Caused by: Exception: Unable to find the current binding.
Backtrace:
2 /home/public_html/sso/vendor/simplesamlphp/saml2/src/SAML2/Binding.php:97 (SAML2_Binding::getCurrentBinding)
1 /home/public_html/sso/modules/saml/lib/IdP/SAML2.php:292 (sspmod_saml_IdP_SAML2::receiveAuthnRequest)
0 /home/public_html/sso/www/saml2/idp/SSOService.php:18 (N/A)

我究竟做错了什么?

PS:您可以使用此处的链接进行尝试

4

0 回答 0