This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Bundle/SecurityBundle
Fabien Potencier aa26e663b1 merged branch adrienbrault/security-feature (PR #4776)
This PR was merged into the master branch.

Discussion
----------

[2.2] [Security] Add an option to disable the hasPreviousSession() check in AbstractAuthenticationListener

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/adrienbrault/symfony.png?branch=security-feature)](http://travis-ci.org/adrienbrault/symfony)
Fixes the following tickets: #3703
Todo: Add this option to the symfony doc security configuration reference
License of the code: MIT
Documentation PR: N/A

As stated in #3703, all authentication listeners that inherit from AbstractAuthenticationListener, only work when a previous session has been created.
This PR allows to change the default behavior in the security.yml file.

Example:

```yml
security:
    firewalls:
        secured_area:
            pattern:    ^/demo/secured/
            form_login:
                check_path: /demo/secured/login_check
                login_path: /demo/secured/login
                require_previous_session: false # The default value is true
            logout:
                path:   /demo/secured/logout
                target: /demo/
            #anonymous: ~
            #http_basic:
            #    realm: "Secured Demo Area"
```

PS: While removing my old commit, it closed the #4774 PR ...

Commits
-------

0562463 [Security] Add an option to disable the hasPreviousSession() check in AbstractAuthenticationListener
2013-03-23 14:17:47 +01:00
..
Command Fixed most of the docblocks/unused namespaces 2012-12-19 08:09:49 +01:00
DataCollector Update SecurityDataCollector.php 2013-03-11 18:37:29 +01:00
DependencyInjection merged branch adrienbrault/security-feature (PR #4776) 2013-03-23 14:17:47 +01:00
EventListener Move remember me ResponseListener from security bundle into security component 2012-08-30 11:15:49 +12:00
Resources Added BCrypt password encoder. 2013-02-05 10:22:32 +01:00
Security updated license blocks 2012-03-31 18:00:32 -03:00
Templating/Helper [Routing] made reference type fully BC and improved phpdoc considerably 2012-12-13 20:13:11 +01:00
Tests replaced usage of the deprecated pattern routing key (replaced with path) 2013-02-07 17:29:53 +01:00
Twig/Extension moved the Security Twig extension to the bridge 2012-06-10 19:01:52 +02:00
CHANGELOG.md Added BCrypt password encoder. 2013-02-05 10:22:32 +01:00
composer.json Merge branch '2.2' 2013-02-11 11:09:44 +01:00
LICENSE updated license year 2013-01-04 17:59:43 +01:00
SecurityBundle.php [BC break][SecurityBundle] Changed the way to register factories 2011-11-17 20:16:17 +01:00