Skip to content

Conversation

@xavierleune
Copy link
Contributor

@xavierleune xavierleune commented Jan 15, 2025

With that feature you can use a Ting Entity directly in your main security configuration:

security:
    # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
    password_hashers:
        Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
    # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
    providers:
        app_user_provider:
            ting:
                class: App\Entity\User
                property: email

Your entity will have to implements the following interfaces: Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface (for password authenticated users) and Symfony\Component\Security\Core\User\UserInterface (common to all kind of users).

You'll have to implement __serialize also.

@xavierleune xavierleune mentioned this pull request Jan 15, 2025
Copy link
Contributor

@vgreb vgreb left a comment

Choose a reason for hiding this comment

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

Seems okay to me. Can you solve conflicts and fix minor issues ?

@xavierleune xavierleune force-pushed the feature/user-provider-2 branch from f52472e to e973b35 Compare January 16, 2025 09:01
@xavierleune
Copy link
Contributor Author

@vgreb branch rebased 👍

@vgreb vgreb merged commit ff6387a into ccmbenchmark:master Jan 16, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants