繁体   English   中英

Symfony 2.8 LDAP 身份验证

[英]Symfony 2.8 LDAP authentication

我正在尝试在 Symfony 2.8 中使用 LDAP 身份验证,但我无法登录。

我根据文档( ldap )配置了所有内容,尝试了很多不同的东西,但没有任何方法可以解决它。 我可以查询我的 ldap 服务器,如果我拼错了密码,登录表单会正确显示“无效凭据”,但是如果我输入正确的用户和密码,似乎什么也没有发生。 我总是在没有会话的情况下卡在登录页面。

我一直在调试 xdebug symfony ldap 类,在 Symfony\\Component\\Security\\Core\\Use\\LdapuserProvider 我发现我的用户是从 LDAP 正确返回的,Symfony 用返回的信息创建了一个用户,但最后我我仍然没有登录并且 LdapProvider 没有创建会话。

有没有人成功地配置过 ldap? 有谁知道是否需要创建用户实体类或配置文档中未涵盖的内容?

这些是我当前的配置:

服务.yml:

ldap:
    class: Symfony\Component\Ldap\LdapClient
    arguments:
        - "my ip"           # host
        - 389               # port
        - 3                 # version
        - false             # SSL
        - false             # TLS

安全:

providers:
    in_memory:
        memory: ~

    my_ldap:
        ldap:
            service:         ldap
            base_dn:         ou=MyOU,dc=myDomain,dc=lan
            search_dn:       "admin-user@myDomain.lan"
            search_password: MyPassword
            filter:          ({uid_key}={username})
            default_roles:   ROLE_USER
            uid_key:         sAMAccountName

firewalls:
    dev:
        pattern: ^/(_(profiler|wdt)|css|images|js)/
        security: false

    main:
        pattern: ^/
        provider: my_ldap
        anonymous: ~

        form_login_ldap:
            provider:    my_ldap
            login_path:  login
            check_path:  login
            service:     ldap
            dn_string:   "{username}@mydomain.lan"

access_control:
    - { path: ^/login$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/, roles: [IS_AUTHENTICATED_FULLY, IS_AUTHENTICATED_REMEMBERED] }

encoders:
    AppBundle\Entity\User: bcrypt

日志:

[2017-03-08 15:48:24] request.INFO: Matched route "login". {"route_parameters":{"_controller":"AppBundle\\Controller\\UserController::loginAction","_route":"login"},"request_uri":"http://noc/app_dev.php/login"} []
[2017-03-08 15:48:24] php.INFO: The Symfony\Component\Ldap\LdapClient class is deprecated since version 3.1 and will be removed in 4.0. Use the Ldap class directly instead. {"type":16384,"file":"/var/www/html/vendor/symfony/ldap/LdapClient.php","line":14,"level":28928,"stack":[{"function":"handleError","class":"Symfony\\Component\\Debug\\ErrorHandler","type":"->"},{"file":"/var/www/html/vendor/symfony/ldap/LdapClient.php","line":14,"function":"trigger_error"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php","line":169,"args":["/var/www/html/vendor/symfony/ldap/LdapClient.php"],"function":"require_once"},{"function":"loadClass","class":"Symfony\\Component\\Debug\\DebugClassLoader","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":1534,"function":"spl_autoload_call"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getLdapService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":3612,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getSecurity_User_Provider_Concrete_MyLdapService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":3540,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getSecurity_Authentication_ManagerService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":2131,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getSecurity_Firewall_Map_Context_MainService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Security/FirewallMap.php","line":40,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall.php","line":61,"function":"getListeners","class":"Symfony\\Bundle\\SecurityBundle\\Security\\FirewallMap","type":"->"},{"function":"onKernelRequest","class":"Symfony\\Component\\Security\\Http\\Firewall","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php","line":61,"function":"call_user_func"},{"function":"__invoke","class":"Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php","line":184,"function":"call_user_func"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php","line":46,"function":"doDispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php","line":140,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":125,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":64,"function":"handleRaw","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php","line":69,"function":"handle","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php","line":185,"function":"handle","class":"Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel","type":"->"},{"file":"/var/www/html/web/app_dev.php","line":28,"function":"handle","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->"}]} []
[2017-03-08 15:48:24] php.INFO: The "find" method is deprecated since version 3.1 and will be removed in 4.0. Use the "query" method instead. {"type":16384,"file":"/var/www/html/vendor/symfony/ldap/LdapClient.php","line":63,"level":28928,"stack":[{"function":"handleError","class":"Symfony\\Component\\Debug\\ErrorHandler","type":"->"},{"file":"/var/www/html/vendor/symfony/ldap/LdapClient.php","line":63,"function":"trigger_error"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Security/Core/User/LdapUserProvider.php","line":62,"function":"find","class":"Symfony\\Component\\Ldap\\LdapClient","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php","line":65,"function":"loadUserByUsername","class":"Symfony\\Component\\Security\\Core\\User\\LdapUserProvider","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php","line":70,"function":"retrieveUser","class":"Symfony\\Component\\Security\\Core\\Authentication\\Provider\\LdapBindAuthenticationProvider","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.php","line":80,"function":"authenticate","class":"Symfony\\Component\\Security\\Core\\Authentication\\Provider\\UserAuthenticationProvider","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php","line":112,"function":"authenticate","class":"Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationProviderManager","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php","line":146,"function":"attemptAuthentication","class":"Symfony\\Component\\Security\\Http\\Firewall\\UsernamePasswordFormAuthenticationListener","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall.php","line":69,"function":"handle","class":"Symfony\\Component\\Security\\Http\\Firewall\\AbstractAuthenticationListener","type":"->"},{"function":"onKernelRequest","class":"Symfony\\Component\\Security\\Http\\Firewall","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php","line":61,"function":"call_user_func"},{"function":"__invoke","class":"Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php","line":184,"function":"call_user_func"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php","line":46,"function":"doDispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php","line":140,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":125,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":64,"function":"handleRaw","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php","line":69,"function":"handle","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php","line":185,"function":"handle","class":"Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel","type":"->"},{"file":"/var/www/html/web/app_dev.php","line":28,"function":"handle","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->"}]} []
[2017-03-08 15:48:24] security.INFO: User has been authenticated successfully. {"username":"ddias"} []
[2017-03-08 15:48:24] security.DEBUG: Stored the security token in the session. {"key":"_security_main"} []
[2017-03-08 15:48:24] request.INFO: Matched route "homepage". {"route_parameters":{"_controller":"AppBundle\\Controller\\DefaultController::indexAction","_route":"homepage"},"request_uri":"http://noc/app_dev.php/"} []
[2017-03-08 15:48:24] php.INFO: The Symfony\Component\Ldap\LdapClient class is deprecated since version 3.1 and will be removed in 4.0. Use the Ldap class directly instead. {"type":16384,"file":"/var/www/html/vendor/symfony/ldap/LdapClient.php","line":14,"level":28928,"stack":[{"function":"handleError","class":"Symfony\\Component\\Debug\\ErrorHandler","type":"->"},{"file":"/var/www/html/vendor/symfony/ldap/LdapClient.php","line":14,"function":"trigger_error"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php","line":169,"args":["/var/www/html/vendor/symfony/ldap/LdapClient.php"],"function":"require_once"},{"function":"loadClass","class":"Symfony\\Component\\Debug\\DebugClassLoader","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":1534,"function":"spl_autoload_call"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getLdapService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":3612,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getSecurity_User_Provider_Concrete_MyLdapService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":3540,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getSecurity_Authentication_ManagerService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":2131,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getSecurity_Firewall_Map_Context_MainService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/classes.php","line":2986,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/app/cache/dev/classes.php","line":2628,"function":"getListeners","class":"Symfony\\Bundle\\SecurityBundle\\Security\\FirewallMap","type":"->"},{"function":"onKernelRequest","class":"Symfony\\Component\\Security\\Http\\Firewall","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php","line":61,"function":"call_user_func"},{"function":"__invoke","class":"Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener","type":"->"},{"file":"/var/www/html/app/cache/dev/classes.php","line":1863,"function":"call_user_func"},{"file":"/var/www/html/app/cache/dev/classes.php","line":1778,"function":"doDispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php","line":140,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":125,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":64,"function":"handleRaw","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php","line":69,"function":"handle","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php","line":185,"function":"handle","class":"Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel","type":"->"},{"file":"/var/www/html/web/app_dev.php","line":28,"function":"handle","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->"}]} []
[2017-03-08 15:48:24] security.DEBUG: Read existing security token from the session. {"key":"_security_main"} []
[2017-03-08 15:48:24] security.WARNING: Username could not be found in the selected user provider. {"username":"ddias","provider":"Symfony\\Component\\Security\\Core\\User\\InMemoryUserProvider"} []
[2017-03-08 15:48:24] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2017-03-08 15:48:24] security.DEBUG: Access denied, the user is not fully authenticated; redirecting to authentication entry point. {"exception":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException(code: 403): Access Denied. at /var/www/html/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AccessListener.php:70)"} []
[2017-03-08 15:48:24] security.DEBUG: Calling Authentication entry point. [] []
[2017-03-08 15:48:24] request.INFO: Matched route "login". {"route_parameters":{"_controller":"AppBundle\\Controller\\UserController::loginAction","_route":"login"},"request_uri":"http://noc/app_dev.php/login"} []
[2017-03-08 15:48:24] php.INFO: The Symfony\Component\Ldap\LdapClient class is deprecated since version 3.1 and will be removed in 4.0. Use the Ldap class directly instead. {"type":16384,"file":"/var/www/html/vendor/symfony/ldap/LdapClient.php","line":14,"level":28928,"stack":[{"function":"handleError","class":"Symfony\\Component\\Debug\\ErrorHandler","type":"->"},{"file":"/var/www/html/vendor/symfony/ldap/LdapClient.php","line":14,"function":"trigger_error"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php","line":169,"args":["/var/www/html/vendor/symfony/ldap/LdapClient.php"],"function":"require_once"},{"function":"loadClass","class":"Symfony\\Component\\Debug\\DebugClassLoader","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":1534,"function":"spl_autoload_call"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getLdapService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":3612,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getSecurity_User_Provider_Concrete_MyLdapService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":3540,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getSecurity_Authentication_ManagerService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":2131,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getSecurity_Firewall_Map_Context_MainService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/classes.php","line":2986,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/app/cache/dev/classes.php","line":2628,"function":"getListeners","class":"Symfony\\Bundle\\SecurityBundle\\Security\\FirewallMap","type":"->"},{"function":"onKernelRequest","class":"Symfony\\Component\\Security\\Http\\Firewall","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php","line":61,"function":"call_user_func"},{"function":"__invoke","class":"Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener","type":"->"},{"file":"/var/www/html/app/cache/dev/classes.php","line":1863,"function":"call_user_func"},{"file":"/var/www/html/app/cache/dev/classes.php","line":1778,"function":"doDispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php","line":140,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":125,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":64,"function":"handleRaw","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php","line":69,"function":"handle","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php","line":185,"function":"handle","class":"Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel","type":"->"},{"file":"/var/www/html/web/app_dev.php","line":28,"function":"handle","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->"}]} []
[2017-03-08 15:48:24] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2017-03-08 15:48:25] request.INFO: Matched route "_wdt". {"route_parameters":{"_controller":"web_profiler.controller.profiler:toolbarAction","token":"11e2b4","_route":"_wdt"},"request_uri":"http://noc/app_dev.php/_wdt/11e2b4"} []
[2017-03-08 15:48:25] php.INFO: The Symfony\Component\Ldap\LdapClient class is deprecated since version 3.1 and will be removed in 4.0. Use the Ldap class directly instead. {"type":16384,"file":"/var/www/html/vendor/symfony/ldap/LdapClient.php","line":14,"level":28928,"stack":[{"function":"handleError","class":"Symfony\\Component\\Debug\\ErrorHandler","type":"->"},{"file":"/var/www/html/vendor/symfony/ldap/LdapClient.php","line":14,"function":"trigger_error"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php","line":169,"args":["/var/www/html/vendor/symfony/ldap/LdapClient.php"],"function":"require_once"},{"function":"loadClass","class":"Symfony\\Component\\Debug\\DebugClassLoader","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":1534,"function":"spl_autoload_call"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getLdapService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":3612,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getSecurity_User_Provider_Concrete_MyLdapService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":3540,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getSecurity_Authentication_ManagerService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":2044,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getSecurity_AuthorizationCheckerService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":3134,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getTwigService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/appDevDebugProjectContainer.php","line":3389,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php","line":314,"function":"getWebProfiler_Controller_ProfilerService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/var/www/html/app/cache/dev/classes.php","line":2553,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/var/www/html/app/cache/dev/classes.php","line":2170,"function":"createController","class":"Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php","line":46,"function":"getController","class":"Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":132,"function":"getController","class":"Symfony\\Component\\HttpKernel\\Controller\\TraceableControllerResolver","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php","line":64,"function":"handleRaw","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php","line":69,"function":"handle","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->"},{"file":"/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php","line":185,"function":"handle","class":"Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel","type":"->"},{"file":"/var/www/html/web/app_dev.php","line":28,"function":"handle","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->"}]} []

好吧看起来我发现了问题......

删除 in_memory 提供程序可以解决它...如果您注意到我的日志第 9 行未找到我的用户,然后在第 10 行再次使用匿名令牌填充 TokenStorage。

所以 LDAP 提供程序让我登录,而 in_memory 提供程序将我注销。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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