Skip to content
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

[Security] Authenticator methods description #20090

Open
wants to merge 2 commits into
base: 7.1
Choose a base branch
from

Conversation

smnandre
Copy link
Member

@smnandre smnandre commented Aug 2, 2024

At first i just wanted to reword this sentence i found missleading.. in the Custom Authenticator page.

If null is returned, the request continues like normal (i.e. the controller matching the login route is called).

I think it should be:

- (i.e. the controller matching the login route is called)
+ (i.e. the controller matching the current route is called)

Because it can be the login route for some Authenticators, but it's not for stateless requests, Header tokens, remember me...

I then realize the "if / if" was the reason I found things a bit unclear at first sight.

onAuthenticationSuccess(Request $request, ...)

    If the user is authenticated, (...)

    If ``null`` is returned, (...)

I read this as some sort of "if / else" ... but the first "if" englobes the whole paragraph (it's true again in the second one).

So i tried to rewrite a bit (using the docblocks from the AuthenticatorInterface as inspiration)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants