Skip to content

[make:auth] support new password hasher interface #824

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
wants to merge 12 commits into from

Conversation

jrushlow
Copy link
Collaborator

@jrushlow jrushlow commented Feb 23, 2021

  • adds support for the new UserPasswordHasherInterface in make:auth. If the new interface exists, it is automatically used.

  • introduces the concept of TemplateClassDetails that has getter methods that return preformatted strings for our most common template variable types.

Depends on:

fixes #821

Comment on lines 48 to 58
if (null === $phpCompatUtil) {
$templateClassFormatter = new TemplateClassFormatter($this->phpCompatUtil);

// trigger_deprecation('symfony/maker-bundle', '1.25', 'Initializing Generator without providing an instance of PhpCompatUtil is deprecated.');
}

$this->templateClassFormatter = $templateClassFormatter;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

todo....

@jrushlow jrushlow force-pushed the fix/deprecated-password-encoder branch from e3bb8f8 to 16050c0 Compare March 24, 2021 08:20
weaverryan added a commit that referenced this pull request Mar 30, 2021
…dUserInterface (jrushlow)

This PR was squashed before being merged into the 1.0-dev branch.

Discussion
----------

[make:user] user entities implement PasswordAuthenticatedUserInterface

Starting in Symfony 5.3 - PR symfony/symfony#40267 introduces the new `PasswordAuthenticatedUserInterface` ~& `LegacyPasswordAuthenticatedUserInterface`~ aimed at decoupling passwords from the `UserInterface`.

- Generated `User` entity implements `PasswordAuthenticatedUserInterface` if it exists.
- Adds correct type hint to the generated `UserRepository::upgradePassword()` method.

Authentication related changes are handled in #824

// cc @chalasr

Commits
-------

f9d9d03 [make:user] user entities implement PasswordAuthenticatedUserInterface
@jrushlow jrushlow force-pushed the fix/deprecated-password-encoder branch from 16050c0 to fcd6c5a Compare April 12, 2021 18:32
@jrushlow jrushlow force-pushed the fix/deprecated-password-encoder branch from fcd6c5a to 0c5913f Compare April 25, 2021 16:32
@gimler
Copy link
Contributor

gimler commented Jul 6, 2021

@jrushlow any update?

@jrushlow
Copy link
Collaborator Author

howdy @gimler, we have introduced some new functionality recently that improves DX and make implementing the new security system (including the hasher interfaces) as a whole much more easier. Don't quote me on this, but my goal is to have this wrapped up this week. PR #923 has to come first so this can be refactored to use some of the new internal functionality in make:auth.

End of the day, I'm shooting to have this released along with other fixes and improvements later this week*. If all goes as planned, MakerBundle will then be fully "compliant" with the new authentication system as of Symfony 5.3.

* Everything is subject to change

@jrushlow jrushlow force-pushed the fix/deprecated-password-encoder branch from 0c5913f to 638432c Compare July 19, 2021 19:27
@jrushlow jrushlow force-pushed the fix/deprecated-password-encoder branch from 0f27385 to c190f34 Compare July 30, 2021 08:55
@jrushlow
Copy link
Collaborator Author

jrushlow commented May 4, 2022

outdated and functionality already added in separate PR's

@jrushlow jrushlow closed this May 4, 2022
@jrushlow jrushlow deleted the fix/deprecated-password-encoder branch May 4, 2022 14:26
@jrushlow jrushlow added the Feature New Feature label May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Form-login authenticators should use the new UserPasswordHasherInterface
2 participants