Renamed methods in AuthorizationCodeRequestRedirectFilter

Fixes gh-4443
This commit is contained in:
Joe Grandja 2017-07-14 17:09:49 -04:00
parent 598a08e2d8
commit f50812c385
1 changed files with 7 additions and 7 deletions

View File

@ -88,11 +88,11 @@ public class AuthorizationCodeRequestRedirectFilter extends OncePerRequestFilter
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
if (this.requiresAuthorization(request, response)) {
if (this.shouldRequestAuthorizationCode(request, response)) {
try {
this.sendRedirectForAuthorization(request, response);
this.sendRedirectForAuthorizationCode(request, response);
} catch (Exception failed) {
this.unsuccessfulAuthorization(request, response, failed);
this.unsuccessfulRedirectForAuthorizationCode(request, response, failed);
}
return;
}
@ -100,11 +100,11 @@ public class AuthorizationCodeRequestRedirectFilter extends OncePerRequestFilter
filterChain.doFilter(request, response);
}
protected boolean requiresAuthorization(HttpServletRequest request, HttpServletResponse response) {
protected boolean shouldRequestAuthorizationCode(HttpServletRequest request, HttpServletResponse response) {
return this.authorizationRequestMatcher.matches(request);
}
protected void sendRedirectForAuthorization(HttpServletRequest request, HttpServletResponse response)
protected void sendRedirectForAuthorizationCode(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
String clientAlias = this.authorizationRequestMatcher
@ -136,8 +136,8 @@ public class AuthorizationCodeRequestRedirectFilter extends OncePerRequestFilter
this.authorizationRedirectStrategy.sendRedirect(request, response, redirectUri.toString());
}
protected void unsuccessfulAuthorization(HttpServletRequest request, HttpServletResponse response,
Exception failed) throws IOException, ServletException {
protected void unsuccessfulRedirectForAuthorizationCode(HttpServletRequest request, HttpServletResponse response,
Exception failed) throws IOException, ServletException {
if (logger.isDebugEnabled()) {
logger.debug("Authorization Request failed: " + failed.toString(), failed);