diff --git a/scm-webapp/src/main/java/sonia/scm/filter/SecurityFilter.java b/scm-webapp/src/main/java/sonia/scm/filter/SecurityFilter.java
index 965e097f64..01967afd00 100644
--- a/scm-webapp/src/main/java/sonia/scm/filter/SecurityFilter.java
+++ b/scm-webapp/src/main/java/sonia/scm/filter/SecurityFilter.java
@@ -70,11 +70,6 @@ public class SecurityFilter extends HttpFilter
@VisibleForTesting
static final String ATTRIBUTE_REMOTE_USER = "principal";
- /** Field description */
- public static final String URL_AUTHENTICATION = "/api/rest/auth";
-
- public static final String URLV2_AUTHENTICATION = "/api/rest/v2/auth";
-
private final ScmConfiguration configuration;
@Inject
diff --git a/scm-webapp/src/test/java/sonia/scm/filter/SecurityFilterTest.java b/scm-webapp/src/test/java/sonia/scm/filter/SecurityFilterTest.java
index 13333cc223..983f8d964a 100644
--- a/scm-webapp/src/test/java/sonia/scm/filter/SecurityFilterTest.java
+++ b/scm-webapp/src/test/java/sonia/scm/filter/SecurityFilterTest.java
@@ -100,14 +100,29 @@ public class SecurityFilterTest {
}
/**
- * Tests filter on authentication endpoint.
- *
+ * Tests filter on authentication endpoint v1.
+ *
* @throws IOException
* @throws ServletException
*/
@Test
- public void testDoOnAuthenticationUrl() throws IOException, ServletException {
- when(request.getRequestURI()).thenReturn("/scm/api/rest/authentication");
+ public void testDoOnAuthenticationUrlV1() throws IOException, ServletException {
+ checkIfAuthenticationUrlIsPassedThrough("/scm/api/rest/auth/access_token");
+ }
+
+ /**
+ * Tests filter on authentication endpoint v2.
+ *
+ * @throws IOException
+ * @throws ServletException
+ */
+ @Test
+ public void testDoOnAuthenticationUrlV2() throws IOException, ServletException {
+ checkIfAuthenticationUrlIsPassedThrough("/scm/api/rest/v2/auth/access_token");
+ }
+
+ private void checkIfAuthenticationUrlIsPassedThrough(String uri) throws IOException, ServletException {
+ when(request.getRequestURI()).thenReturn(uri);
securityFilter.doFilter(request, response, chain);
verify(request, never()).setAttribute(Mockito.anyString(), Mockito.any());
verify(chain).doFilter(request, response);
@@ -235,4 +250,4 @@ public class SecurityFilterTest {
}
-}
\ No newline at end of file
+}
diff --git a/scm.iml b/scm.iml
index a0d516ed9a..4ed0077c7f 100644
--- a/scm.iml
+++ b/scm.iml
@@ -12,5 +12,10 @@
+
+
+
+
+
\ No newline at end of file