File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
web/src/main/java/org/springframework/security/web/authentication Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2016 the original author or authors.
2
+ * Copyright 2002-2025 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
23
23
import org .apache .commons .logging .Log ;
24
24
import org .apache .commons .logging .LogFactory ;
25
25
26
+ import org .springframework .http .HttpStatus ;
26
27
import org .springframework .security .core .AuthenticationException ;
27
28
import org .springframework .security .web .AuthenticationEntryPoint ;
28
29
@@ -55,7 +56,7 @@ public class Http403ForbiddenEntryPoint implements AuthenticationEntryPoint {
55
56
public void commence (HttpServletRequest request , HttpServletResponse response , AuthenticationException arg2 )
56
57
throws IOException {
57
58
logger .debug ("Pre-authenticated entry point called. Rejecting access" );
58
- response .sendError (HttpServletResponse . SC_FORBIDDEN , "Access Denied" );
59
+ response .sendError (HttpStatus . FORBIDDEN . value (), HttpStatus . FORBIDDEN . getReasonPhrase () );
59
60
}
60
61
61
62
}
You can’t perform that action at this time.
0 commit comments