KEYCLOAK-3669: Fix Tomcat Adapter for 8.5.5
This commit is contained in:
parent
317749a7fd
commit
1c2f49ab4e
1 changed files with 11 additions and 0 deletions
|
@ -39,10 +39,21 @@ import java.util.List;
|
||||||
* @version $Revision: 1 $
|
* @version $Revision: 1 $
|
||||||
*/
|
*/
|
||||||
public class KeycloakAuthenticatorValve extends AbstractKeycloakAuthenticatorValve {
|
public class KeycloakAuthenticatorValve extends AbstractKeycloakAuthenticatorValve {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method called by Tomcat < 8.5.5
|
||||||
|
*/
|
||||||
public boolean authenticate(Request request, HttpServletResponse response) throws IOException {
|
public boolean authenticate(Request request, HttpServletResponse response) throws IOException {
|
||||||
return authenticateInternal(request, response, request.getContext().getLoginConfig());
|
return authenticateInternal(request, response, request.getContext().getLoginConfig());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method called by Tomcat >= 8.5.5
|
||||||
|
*/
|
||||||
|
protected boolean doAuthenticate(Request request, HttpServletResponse response) throws IOException {
|
||||||
|
return this.authenticate(request, response);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean forwardToErrorPageInternal(Request request, HttpServletResponse response, Object loginConfig) throws IOException {
|
protected boolean forwardToErrorPageInternal(Request request, HttpServletResponse response, Object loginConfig) throws IOException {
|
||||||
if (loginConfig == null) return false;
|
if (loginConfig == null) return false;
|
||||||
|
|
Loading…
Reference in a new issue