Преглед на файлове

Allow authenticationIsRequired to be overridden

Issue gh-10347
shazin преди 3 години
родител
ревизия
1e0e9a2c98
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      web/src/main/java/org/springframework/security/web/authentication/www/BasicAuthenticationFilter.java

+ 1 - 1
web/src/main/java/org/springframework/security/web/authentication/www/BasicAuthenticationFilter.java

@@ -202,7 +202,7 @@ public class BasicAuthenticationFilter extends OncePerRequestFilter {
 		chain.doFilter(request, response);
 	}
 
-	private boolean authenticationIsRequired(String username) {
+	protected boolean authenticationIsRequired(String username) {
 		// Only reauthenticate if username doesn't match SecurityContextHolder and user
 		// isn't authenticated (see SEC-53)
 		Authentication existingAuth = this.securityContextHolderStrategy.getContext().getAuthentication();