commit | 8a05e3764f67fa6b5cbd7d03e014337333c94482 | [log] [tgz] |
---|---|---|
author | abcpro1 <abcpro11051@disroot.org> | Mon Nov 07 20:09:34 2022 +0000 |
committer | abcpro1 <abcpro11051@disroot.org> | Wed Nov 09 21:49:03 2022 +0000 |
tree | 3a16489f6888efe35c79867492eb62ff3b10a845 | |
parent | a94a042ff31d8648db120e21e1c526c38b429f50 [diff] |
Jersey 2: Use getSecurityContext() where necessary SecurityContext methods are accessible through getSecurityContext(). References: https://jakartaee.github.io/rest/apidocs/2.1.6/javax/ws/rs/container/ContainerRequestContext.html#getSecurityContext() https://jakartaee.github.io/rest/apidocs/2.1.6/javax/ws/rs/core/SecurityContext.html
diff --git a/core/src/main/java/de/ids_mannheim/korap/web/filter/AuthenticationFilter.java b/core/src/main/java/de/ids_mannheim/korap/web/filter/AuthenticationFilter.java index 4d4a17b..4b5e471 100644 --- a/core/src/main/java/de/ids_mannheim/korap/web/filter/AuthenticationFilter.java +++ b/core/src/main/java/de/ids_mannheim/korap/web/filter/AuthenticationFilter.java
@@ -110,7 +110,7 @@ "Context is not valid: " + "missing username, password or authentication scheme."); } - else if (context.isSecureRequired() && !request.isSecure()) { + else if (context.isSecureRequired() && !request.getSecurityContext().isSecure()) { throw new KustvaktException(StatusCodes.AUTHENTICATION_FAILED, "Request is not secure."); }