Skip to content

Conversation

@SteNafH
Copy link

@SteNafH SteNafH commented Jun 22, 2024

Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
License MIT

When using the Security::login() function it was not possible to set attributes on a passport. My authenticator is trying to get an attribute from a passport hence this PR.

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.2 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot carsonbot changed the title Allow passing attributes to passport via Security::login() [Security][SecurityBundle] Allow passing attributes to passport via Security::login() Jun 24, 2024
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks legit to me but please add tests.

Comment on lines +65 to +66
* @param BadgeInterface[] $badges Optionally, pass some Passport badges to use for the manual login
* @param array<string, mixed> $attributes Optionally, pass some Passport attributes to use for the manual login
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why fabbot didn't pick this one

Suggested change
* @param BadgeInterface[] $badges Optionally, pass some Passport badges to use for the manual login
* @param array<string, mixed> $attributes Optionally, pass some Passport attributes to use for the manual login
* @param BadgeInterface[] $badges Optionally, pass some Passport badges to use for the manual login
* @param array<string, mixed> $attributes Optionally, pass some Passport attributes to use for the manual login

@OskarStark OskarStark changed the title [Security][SecurityBundle] Allow passing attributes to passport via Security::login() [Security][SecurityBundle] Allow passing attributes to passport via Security::login() Jun 25, 2024
@chalasr
Copy link
Member

chalasr commented Aug 26, 2024

@SteNafH Do you plan to finish this PR anytime soon or would you like someone to take over?

@stefankleff
Copy link

Hi @chalasr - This isn't my PR :) It seems you tagged the wrong person

@SteNafH
Copy link
Author

SteNafH commented Sep 3, 2024

Hey @chalasr it is my pr ;), I have found another way of fixing the problem that made me open this PR in the first place. However I do feel that this is a good feature to have...

Sadly I don't have a lot of time on my hands and I would appreciate if someone else would takeover this pr!

@OskarStark OskarStark added the Help wanted Issues and PRs which are looking for volunteers to complete them. label Sep 3, 2024
@OskarStark
Copy link
Contributor

OskarStark commented Sep 5, 2024

@OskarStark OskarStark closed this Sep 5, 2024
fabpot added a commit that referenced this pull request Sep 18, 2024
… passport via `Security::login()` (alexandre-daubois)

This PR was merged into the 7.2 branch.

Discussion
----------

[Security][SecurityBundle] Allow passing attributes to passport via `Security::login()`

| Q             | A
| ------------- | ---
| Branch?       | 7.2
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Issues        | -
| License       | MIT

Supersedes #57495 after the last comment.

Commits
-------

73b863c [Security][SecurityBundle] Allow passing attributes to passport via `Security::login()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Help wanted Issues and PRs which are looking for volunteers to complete them. Security SecurityBundle Status: Needs Work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants