|
@@ 93-101 (lines=9) @@
|
| 90 |
|
$options['username_parameter'] = empty($options['username_parameter']) ? 'mobile' : $options['username_parameter']; |
| 91 |
|
$options['password_parameter'] = empty($options['password_parameter']) ? 'code' : $options['password_parameter']; |
| 92 |
|
|
| 93 |
|
if (!isset($app['security.authentication.success_handler.' . $name])) { |
| 94 |
|
$app['security.authentication.success_handler.' . $name] = $app->share(function ( |
| 95 |
|
) use ($name, $options, $app) { |
| 96 |
|
$handler = new DefaultAuthenticationSuccessHandler($app['security.http_utils'], |
| 97 |
|
$options); |
| 98 |
|
$handler->setProviderKey($name); |
| 99 |
|
return $handler; |
| 100 |
|
}); |
| 101 |
|
} |
| 102 |
|
|
| 103 |
|
if (!isset($app['security.authentication.failure_handler.' . $name])) { |
| 104 |
|
$app['security.authentication.failure_handler.' . $name] = $app->share(function ( |
|
@@ 103-110 (lines=8) @@
|
| 100 |
|
}); |
| 101 |
|
} |
| 102 |
|
|
| 103 |
|
if (!isset($app['security.authentication.failure_handler.' . $name])) { |
| 104 |
|
$app['security.authentication.failure_handler.' . $name] = $app->share(function ( |
| 105 |
|
) use ($name, $options, $app) { |
| 106 |
|
return new DefaultAuthenticationFailureHandler($app, |
| 107 |
|
$app['security.http_utils'], $options, |
| 108 |
|
$app['logger']); |
| 109 |
|
}); |
| 110 |
|
} |
| 111 |
|
|
| 112 |
|
return new UsernamePasswordFormAuthenticationListener( |
| 113 |
|
$app['security.token_storage'], |