@@ -78,15 +78,15 @@ public AuthenticationFilter(AuthenticationManager authenticationManager,
78
78
79
79
public AuthenticationFilter (AuthenticationManagerResolver <HttpServletRequest > authenticationManagerResolver ,
80
80
AuthenticationConverter authenticationConverter ) {
81
- Assert .notNull (authenticationManagerResolver , "authenticationResolverManager cannot be null" );
81
+ Assert .notNull (authenticationManagerResolver , "authenticationManagerResolver cannot be null" );
82
82
Assert .notNull (authenticationConverter , "authenticationConverter cannot be null" );
83
83
84
84
this .authenticationManagerResolver = authenticationManagerResolver ;
85
85
this .authenticationConverter = authenticationConverter ;
86
86
}
87
87
88
88
public RequestMatcher getRequestMatcher () {
89
- return requestMatcher ;
89
+ return this . requestMatcher ;
90
90
}
91
91
92
92
public void setRequestMatcher (RequestMatcher requestMatcher ) {
@@ -95,7 +95,7 @@ public void setRequestMatcher(RequestMatcher requestMatcher) {
95
95
}
96
96
97
97
public AuthenticationConverter getAuthenticationConverter () {
98
- return authenticationConverter ;
98
+ return this . authenticationConverter ;
99
99
}
100
100
101
101
public void setAuthenticationConverter (AuthenticationConverter authenticationConverter ) {
@@ -104,7 +104,7 @@ public void setAuthenticationConverter(AuthenticationConverter authenticationCon
104
104
}
105
105
106
106
public AuthenticationSuccessHandler getSuccessHandler () {
107
- return successHandler ;
107
+ return this . successHandler ;
108
108
}
109
109
110
110
public void setSuccessHandler (AuthenticationSuccessHandler successHandler ) {
@@ -113,7 +113,7 @@ public void setSuccessHandler(AuthenticationSuccessHandler successHandler) {
113
113
}
114
114
115
115
public AuthenticationFailureHandler getFailureHandler () {
116
- return failureHandler ;
116
+ return this . failureHandler ;
117
117
}
118
118
119
119
public void setFailureHandler (AuthenticationFailureHandler failureHandler ) {
@@ -122,7 +122,7 @@ public void setFailureHandler(AuthenticationFailureHandler failureHandler) {
122
122
}
123
123
124
124
public AuthenticationManagerResolver <HttpServletRequest > getAuthenticationManagerResolver () {
125
- return authenticationManagerResolver ;
125
+ return this . authenticationManagerResolver ;
126
126
}
127
127
128
128
public void setAuthenticationManagerResolver (
@@ -134,7 +134,7 @@ public void setAuthenticationManagerResolver(
134
134
@ Override
135
135
protected void doFilterInternal (HttpServletRequest request , HttpServletResponse response , FilterChain filterChain )
136
136
throws ServletException , IOException {
137
- if (!requestMatcher .matches (request )) {
137
+ if (!this . requestMatcher .matches (request )) {
138
138
filterChain .doFilter (request , response );
139
139
return ;
140
140
}
@@ -155,26 +155,25 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
155
155
private void unsuccessfulAuthentication (HttpServletRequest request , HttpServletResponse response ,
156
156
AuthenticationException failed ) throws IOException , ServletException {
157
157
SecurityContextHolder .clearContext ();
158
- failureHandler .onAuthenticationFailure (request , response , failed );
158
+ this . failureHandler .onAuthenticationFailure (request , response , failed );
159
159
}
160
160
161
161
protected void successfulAuthentication (HttpServletRequest request , HttpServletResponse response , FilterChain chain ,
162
162
Authentication authentication ) throws IOException , ServletException {
163
163
SecurityContext context = SecurityContextHolder .createEmptyContext ();
164
164
context .setAuthentication (authentication );
165
165
SecurityContextHolder .setContext (context );
166
-
167
- successHandler .onAuthenticationSuccess (request , response , chain , authentication );
166
+ this .successHandler .onAuthenticationSuccess (request , response , chain , authentication );
168
167
}
169
168
170
169
public Authentication attemptAuthentication (HttpServletRequest request , HttpServletResponse response )
171
170
throws AuthenticationException , IOException , ServletException {
172
- Authentication authentication = authenticationConverter .convert (request );
171
+ Authentication authentication = this . authenticationConverter .convert (request );
173
172
if (authentication == null ) {
174
173
return null ;
175
174
}
176
175
177
- AuthenticationManager authenticationManager = authenticationManagerResolver .resolve (request );
176
+ AuthenticationManager authenticationManager = this . authenticationManagerResolver .resolve (request );
178
177
Authentication authenticationResult = authenticationManager .authenticate (authentication );
179
178
if (authenticationResult == null ) {
180
179
throw new ServletException ("AuthenticationManager should not return null Authentication object." );
0 commit comments