Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Problem is solved.</p> <p>I've just extended my <code>LdapAuthenticationListener</code> class with symfony2 <code>UsernamePasswordFormAuthenticationListener</code> and change bootstarp like this:</p> <pre class="lang-php prettyprint-override"><code>$app['security.authentication_listener.factory.ldap'] = $app-&gt;protect( function ($name, $options) use ($app) { $app['security.authentication_provider.'.$name.'.ldap'] = $app-&gt;share( function () use ($app) { return new LdapAuthenticationProvider( $app['security.user_provider.default'], 'ldap' ); } ); $app['security.authentication_listener.'.$name.'.ldap'] = $app-&gt;share( function () use ($app, $name, $options) { $app['security.authentication.success_handler.'.$name] = $app['security.authentication.success_handler._proto']($name, $options); $app['security.authentication.failure_handler.'.$name] = $app['security.authentication.failure_handler._proto']($name, $options); return new LdapAuthenticationListener( $app['security'], $app['security.authentication_manager'], $app['security.session_strategy'], $app['security.http_utils'], $name, $app['security.authentication.success_handler.'.$name], $app['security.authentication.failure_handler.'.$name], array_merge( array( 'check_path' =&gt; '/admin/login_check', 'login_path' =&gt; '/login', ), $options ), $app['logger'], $app['dispatcher'], null ); } ); return array( 'security.authentication_provider.'.$name.'.ldap', 'security.authentication_listener.'.$name.'.ldap', null, 'pre_auth' ); } </code></pre> <p>I need custom authentication listener to overwrite token in authentication method and authentication provider retrieve user from user provider by username and password <code>$this-&gt;userProvider-&gt;loadUserByUsernameAndPassword($usernam, $password)</code></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload