8000 [SecurityBundle] Deprecate not configuring explicitly a provider for cu… · Issue #16041 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[SecurityBundle] Deprecate not configuring explicitly a provider for cu… #16041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fabpot opened this issue Oct 30, 2021 · 2 comments · Fixed by #17215
Closed

[SecurityBundle] Deprecate not configuring explicitly a provider for cu… #16041

fabpot opened this issue Oct 30, 2021 · 2 comments · Fixed by #17215
Labels
hasPR A Pull Request has already been submitted for this issue. help wanted Issues and PRs which are looking for volunteers to complete them. SecurityBundle
Milestone

Comments

@fabpot
Copy link
Member
fabpot commented Oct 30, 2021
Q A
Feature PR symfony/symfony#43835
PR author(s) @lyrixx
Merged in 5.4
@fabpot fabpot added this to the 5.4 milestone Oct 30, 2021
@javiereguiluz
Copy link
Member

We have some custom_authenticators occurrences in docs ... but I'm not sure if we have to change something. I don't fully understand the changes at symfony/symfony#43835

@javiereguiluz javiereguiluz added the help wanted Issues and PRs which are looking for volunteers to complete them. label Nov 2, 2021
@lyrixx
Copy link
Member
lyrixx commented Nov 4, 2021

@javiereguiluz There is a new deprecation when one have two or more user provider and a custom_authenticator and does not specify the user provider to use.

the following configuration will emit a deprecation:

security:
    enable_authenticator_manager: true

    providers:
        app_user_provider_email:
            entity:
                class: App\Entity\User
                property: email
        app_user_provider_token:
            entity:
                class: App\Entity\User
                property: token
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        main:
            lazy: true
            custom_authenticator: App\Security\TokenAuthenticator

and the following one is OK:

security:
    enable_authenticator_manager: true

    providers:
        app_user_provider_email:
            entity:
                class: App\Entity\User
                property: email
        app_user_provider_token:
            entity:
                class: App\Entity\User
                property: token
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        main:
            lazy: true
            provider: app_user_provider_token
            custom_authenticator: App\Security\TokenAuthenticator

@xabbuh xabbuh added the hasPR A Pull Request has already been submitted for this issue. label Aug 22, 2022
xabbuh added a commit that referenced this issue Nov 20, 2022
…om_authenticators when there is more than one registered provider (mdoutreluingne)

This PR was squashed before being merged into the 5.4 branch.

Discussion
----------

Deprecate not configuring explicitly a provider for custom_authenticators when there is more than one registered provider

Fixes #16041

Commits
-------

728d75b Deprecate not configuring explicitly a provider for custom_authenticators when there is more than one registered provider
@xabbuh xabbuh closed this as completed Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hasPR A Pull Request has already been submitted for this issue. help wanted Issues and PRs which are looking for volunteers to complete them. SecurityBundle
Projects
None yet
5 participants
0