jjzjj

SecurityServiceProvider

全部标签

php - 使用 Silex 和 Symfony 3 配置 LDAP 身份验证

我正在尝试使用Symfony(3.0.1)提供的LDAP组件在我的Silex(1.3.5)应用程序中配置LDAP身份验证。这是我当前的配置:$app['ldap']=function(){returnnewSymfony\Component\Ldap\LdapClient('ldap.example.com');};$app->register(newSecurityServiceProvider(),['security.providers'=>['users'=>['ldap'=>['service'=>'ldap','base_dn'=>'dc=example,dc=com','

php - Silex SecurityServiceProvider 抛出 'Identifier "security.authentication_providers“未定义。”

我不知道如何在Silex中使用SecurityServiceProvider。我的配置是:$app['security.firewalls']=array('admin'=>array('pattern'=>'^/_admin/.+','form'=>array('login_path'=>'/_admin/','check_path'=>'/_admin/login_check'),'logout'=>array('logout_path'=>'/_admin/logout'),'users'=>array('admin'=>array('ROLE_ADMIN','5FZ2Z8QIk