-
Notifications
You must be signed in to change notification settings - Fork 25
Token for amLoggedInAs should be configurable #165
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
Comments
Hi @codedge , I understand. The problem here is that the signature of the I would agree to create a method that receives as parameter an object of type " $token = $I->createAuthenticationToken($user, $firewallName);
$I->amLoggedInWithToken($token); This way you can do whatever you want with the What do you think of this approach? Thank you! |
@TavoNiievez Sounds like a good solution to me. I would take care of this and provide a PR. |
@TavoNiievez See #182 |
* Login with token * Update token logic --------- Co-authored-by: TavoNiievez <[email protected]>
I am testing some functionality regarding login and logout with an external OpenID provider. For that, I depend on some attributes that are set on the token.
In Symfony Tokens can have so called attributes. See
TokenInterface
(https://github.com/symfony/security-core/blob/6.2/Authentication/Token/TokenInterface.php#L76).When using this modules
amLoggedInAs
method, I cannot modify the returned token,This token generation should be switched to an approach, where I can control the token, f. ex. setting some attributes on the token.
And so my logic, that depends on attributes for the token fails.
The text was updated successfully, but these errors were encountered: