使用simpleSAMLPHP作为SugarCRM的身份提供者

时间:2015-08-13 15:07:30

标签: php single-sign-on saml sugarcrm simplesamlphp

我安装了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:您可以使用链接here

进行尝试

0 个答案:

没有答案