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

Appearance settings

[Security] SimpleAuthenticationProvider is broken #26775

Copy link
Copy link
Closed
@leofeyer

Description

@leofeyer
Issue body actions
Q A
Bug report? yes
Feature request? no
BC Break report? yes
RFC? no
Symfony version 3.4.7

The changes from #26370 break the simple authentication provider.

$user = $authToken->getUser();
$this->userChecker->checkPreAuth($user);

$authToken->getUser() returns a "UserInterface instance, an object implementing a __toString method, or the username as a regular string", however the UserChecker::checkPreAuth() method allows a UserInterface instance only. An anonymous token results in the following exception:

Type error: Argument 1 passed to Symfony\Component\Security\Core\User\UserChecker::checkPreAuth() must be an instance of Symfony\Component\Security\Core\User\UserInterface, string given, called in …/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/SimpleAuthenticationProvider.php on line 49

@i3or1s /cc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.