Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Security] Add aChainUserChecker to allow calling multiple user checkers for a firewall#46064

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:6.2frommbabker:chained-user-checker
Sep 13, 2022

Conversation

@mbabker
Copy link
Contributor

@mbabkermbabker commentedApr 15, 2022
edited
Loading

QA
Branch?6.2
Bug fix?no
New feature?yes
Deprecations?no
TicketsN/A
LicenseMIT
Doc PRTODO

I had a case in one of my apps where I have some shared logic for user checkers across multiple firewalls (API and traditional web login) while also needing extra logic for the API. Instead of duplicating the checker for each firewall or using a decorator, I thought a chained user checker would be nice to have and that it might be useful to users of the framework.

This will add aChainUserChecker class to thesecurity-core component, and the SecurityBundle will create asecurity.user_checker.chain.<firewall> service for each firewall. User checkers can then be tagged with asecurity.user_checker.<firewall> tag for each firewall the checker applies to, and users would set this chain service as the user checker for their firewall.

<?phpnamespaceApp\Security\User;useSymfony\Component\DependencyInjection\Attribute\Autoconfigure;useSymfony\Component\Security\Core\User\UserCheckerInterface;#[Autoconfigure(tags: [['security.user_checker.main' => ['priority' =>10]]])]#[Autoconfigure(tags: [['security.user_checker.api' => ['priority' =>10]]])]finalclass DisabledAccountUserCheckerimplements UserCheckerInterface {}#[Autoconfigure(tags: [['security.user_checker.api' => ['priority' =>5]]])]finalclass ApiAccessAllowedUserCheckerimplements UserCheckerInterface {}

maxhelias and dadangnh reacted with thumbs up emoji
@carsonbotcarsonbot added this to the6.1 milestoneApr 15, 2022
@mbabkermbabkerforce-pushed thechained-user-checker branch 2 times, most recently fromb79f4f8 tofdf2d0fCompareApril 15, 2022 16:34
@carsonbotcarsonbot changed the titleAdd a ChainUserChecker to allow calling multiple user checkers for a firewall[Security] Add a ChainUserChecker to allow calling multiple user checkers for a firewallApr 15, 2022
@derrabusderrabus modified the milestones:6.1,6.2Apr 15, 2022
@OskarStarkOskarStark changed the title[Security] Add a ChainUserChecker to allow calling multiple user checkers for a firewall[Security] Add aChainUserChecker to allow calling multiple user checkers for a firewallApr 25, 2022
@mbabkermbabkerforce-pushed thechained-user-checker branch from4661374 toe111ec8CompareJune 7, 2022 23:27
@mbabkermbabkerforce-pushed thechained-user-checker branch 2 times, most recently from1b73f8f to711b918CompareSeptember 6, 2022 13:33
@fabpot
Copy link
Member

Thank you@mbabker.

@mbabkermbabker deleted the chained-user-checker branchSeptember 13, 2022 11:20
@fabpotfabpot mentioned this pull requestOct 24, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@fabpotfabpotfabpot approved these changes

@derrabusderrabusderrabus approved these changes

@wouterjwouterjAwaiting requested review from wouterjwouterj is a code owner

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

+1 more reviewer

@maxheliasmaxheliasmaxhelias approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

6.2

Development

Successfully merging this pull request may close these issues.

6 participants

@mbabker@fabpot@stof@derrabus@maxhelias@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp