Skip to content

Commit 4a5da35

Browse files
committed
minor #16049 [Security] Fix Response HTTP constant (pyrech)
This PR was merged into the 5.3 branch. Discussion ---------- [Security] Fix Response HTTP constant `Response::HTTP_UNAUTHENTICATED` does not exist in the new 5.3 security documentation. I guess the correct constant is `Response::HTTP_UNAUTHORIZED` 😅 Commits ------- c5420cf Fix Response HTTP constant
2 parents e214375 + c5420cf commit 4a5da35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ token (or whatever you need to return) and return the JSON response:
10731073
+ if (null === $user) {
10741074
+ return $this->json([
10751075
+ 'message' => 'missing credentials',
1076-
+ ], Response::HTTP_UNAUTHENTICATED);
1076+
+ ], Response::HTTP_UNAUTHORIZED);
10771077
+ }
10781078
+
10791079
+ $token = ...; // somehow create an API token for $user

0 commit comments

Comments
 (0)