Skip to content

Commit c2cad23

Browse files
committed
minor symfony#16936 [Security] backported phpdoc from Guard component. (hhamon)
This PR was merged into the 2.3 branch. Discussion ---------- [Security] backported phpdoc from Guard component. | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ~ | License | MIT | Doc PR | ~ Commits ------- cab6fd5 [Security] backported phpdoc from Guard component.
2 parents c7f7a9a + cab6fd5 commit c2cad23

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,17 @@
2424
interface AuthenticationEntryPointInterface
2525
{
2626
/**
27-
* Starts the authentication scheme.
27+
* Returns a response that directs the user to authenticate.
28+
*
29+
* This is called when an anonymous request accesses a resource that
30+
* requires authentication. The job of this method is to return some
31+
* response that "helps" the user start into the authentication process.
32+
*
33+
* Examples:
34+
* A) For a form login, you might redirect to the login page
35+
* return new RedirectResponse('/login');
36+
* B) For an API token authentication system, you return a 401 response
37+
* return new Response('Auth header required', 401);
2838
*
2939
* @param Request $request The request that resulted in an AuthenticationException
3040
* @param AuthenticationException $authException The exception that started the authentication process

0 commit comments

Comments
 (0)