What are the Slack Archives?
It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi everyone, I think I have a pretty simple question, but still we were not able to resolve it with
Hi everyone,
I think I have a pretty simple question, but still we were not able to resolve it with a reasonable amount of investigation:
- which controller or component handles the /login_check request in Yves?
- How can I intercept a successful login event in Zed (CustomerFacade->tryAuthorizeCustomerByEmailAndPassword seems not to be called)?
Comments
-
Maybe this one is what you're looking for:
project/src/Pyz/Yves/CustomerPage/Plugin/Provider/CustomerAuthenticationSuccessHandler.php
:onAuthenticationSuccess(
Request $request, TokenInterface $token)
0 -
thx for the ultra-quick response - but sadly: no, I cannot use this. I need to send a message to RabbitMQ, but Yves should not have any dependency to RabbitMQ (architecture anti-pattern).
0 -
You're welcome 🙂 Sorry, I missed the call of the CustomerFacade; can't tell you where the request goes in Zed 🤐 Only used this for logging successful logins.
0 -
/login_check comes from https://github.com/spryker/security/blob/c273f0bf219f56244cda76cc21936ace3c18d797/src/Spryker/Yves/Security/Plugin/Application/SecurityApplicationPlugin.php#L966
https://github.com/spryker/customer/blob/master/src/Spryker/Zed/Customer/Business/Customer/Customer.php#L734 is the right point to intercept customer logins.
0 -
as far as I can see it, the only point where Zed is called during Yves Login process is a GET on /customer/gateway/customer
0 -
actually
\Spryker\Client\Customer\CustomerClient::findCustomerWithEmailAndPassword() also see \Spryker\Client\Customer\CustomerClient::login()
generates zed call to
\Spryker\Zed\Customer\Communication\Controller\GatewayController
0 -
thanks Stanislav. Already saw that - seems to be unused during Yves login process. Do you see any usage of these methods anywhere? Maybe I missed that!
0 -
\SprykerShop\Yves\CustomerPage\Plugin\Provider\CustomerUserProvider::loadUserByUsername()
is used by authenticator,
then received user
is checked by\Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider::checkAuthentication()
inside\Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider::authenticate()
0 -
so as I see you need to check
\Symfony\Component\Security\Core\User\UserProviderInterface
and probably implement your provider instead ofCustomerUserProvider
0 -
which actually means that the check happens in Symfony called by Yves, and there is no credentials check performed by Zed in this case . Right?
0 -
right, Zed just provides a user by email which contains a password. And Symfony checks if password is correct
0 -
thanks for the confirmation. I‘ll then implement the interceptor for glue and yves separately.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random