View | Details | Raw Unified | Return to bug 64712
Collapse All | Expand All

(-)a/java/org/apache/catalina/authenticator/AuthenticatorBase.java (-4 / +7 lines)
Lines 928-939 Link Here
928
                    !principal.getUserPrincipal().equals(request.getUserPrincipal())) {
928
                    !principal.getUserPrincipal().equals(request.getUserPrincipal())) {
929
                // Skip registration if authentication credentials were
929
                // Skip registration if authentication credentials were
930
                // cached and the Principal did not change.
930
                // cached and the Principal did not change.
931
                @SuppressWarnings("rawtypes")// JASPIC API uses raw types
931
                @SuppressWarnings("rawtypes") // JASPIC API uses raw types
932
                Map map = state.messageInfo.getMap();
932
                Map map = state.messageInfo.getMap();
933
                if (map != null && map.containsKey("jakarta.servlet.http.registerSession")) {
933
                @SuppressWarnings("unchecked")
934
                    register(request, response, principal, "JASPIC", null, null, true, true);
934
                String authType = (String) map.getOrDefault("javax.servlet.http.authType",
935
                        "JASPIC");
936
                if (map.containsKey("jakarta.servlet.http.registerSession")) {
937
                    register(request, response, principal, authType, null, null, true, true);
935
                } else {
938
                } else {
936
                    register(request, response, principal, "JASPIC", null, null);
939
                    register(request, response, principal, authType, null, null);
937
                }
940
                }
938
            }
941
            }
939
            request.setNote(Constants.REQ_JASPIC_SUBJECT_NOTE, client);
942
            request.setNote(Constants.REQ_JASPIC_SUBJECT_NOTE, client);

Return to bug 64712