Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 绕过Ldap在Symfony项目中创建测试用户_Php_Apache_Symfony_Ldap - Fatal编程技术网

Php 绕过Ldap在Symfony项目中创建测试用户

Php 绕过Ldap在Symfony项目中创建测试用户,php,apache,symfony,ldap,Php,Apache,Symfony,Ldap,我目前正在为我的Symfony项目中的用户使用ldap身份验证(ldap工具)。 一切都很好。 唯一的问题是,我想为ldap网络之外的某个用户创建一个testAccount,但我无权访问它。我只能管理我的数据库,因为它需要ldap身份验证,所以我无法使用FOSuserBundle创建普通用户 ldap_tools: domains: heve: domain_name: test.heve username: password:

我目前正在为我的Symfony项目中的用户使用ldap身份验证(ldap工具)。 一切都很好。 唯一的问题是,我想为ldap网络之外的某个用户创建一个testAccount,但我无权访问它。我只能管理我的数据库,因为它需要ldap身份验证,所以我无法使用FOSuserBundle创建普通用户

ldap_tools:
domains:
    heve:
        domain_name: test.heve
        username: 
        password: 
        base_dn: "dc=test,dc=heve"
        servers: ['slnt-gtr04.test.heve']
security:
    # Set to null for no role to be assigned by default. Or set it to another role altogether.
    default_role: ROLE_USER
    # Set this to true if you want user attributes re-queried on each request.
    refresh_user_attributes: false
    # Set this to true if you want user roles re-queried on each request.
    refresh_user_roles: false
    guard:
        # This is the entry point/start path route name for the RedirectResponse of the Guard component
        default_target_path: '/'
        always_use_target_path: false
        target_path_parameter: '_target_path'
        use_referrer: true
        failure_path: null
        failure_forward: false
        failure_path_parameter: '_failure_path'
        remember_me: false
是否有任何方法可以将附加用户添加到我的ldap配置(config.yml)或Apache服务或其他内容中

非常感谢你的帮助。
Younes

如果不仅仅是ldap,请使用第二个用户提供商,谢谢您的帮助。事实上,我没有抓住这一点。非常感谢你,goto!实际上,我创建了另一个提供者(使用链等)。与auth一样工作良好,但我的整个安全检查都基于Ldap管理器协议(如令牌、安全角色等),因此我无法完成testUser方法。。。也许在apache中我可以模仿它,我不知道如果它不仅仅是ldap,那么请使用第二个用户提供程序,谢谢您的帮助。事实上,我没有抓住这一点。非常感谢你,goto!实际上,我创建了另一个提供者(使用链等)。与auth一样工作良好,但我的整个安全检查都基于Ldap管理器协议(如令牌、安全角色等),因此我无法完成testUser方法。。。也许在阿帕奇我可以模仿它我不知道