@Test void testExtractSpaceGuid() { Mockito.when(request.getRequestURI()) .thenReturn(String.format("/api/v1/spaces/%s/mtas", SPACE_GUID)); assertEquals(SPACE_GUID, mtasApiAuthorizationFilter.extractSpaceGuid(request)); }
@Override protected String extractSpaceGuid(HttpServletRequest request) { String uri = ServletUtil.decodeUri(request); return extractSpaceGuid(ServletUtil.removeInvalidForwardSlashes(uri)); }
MtasApiAuthorizationFilter extends SpaceGuidBasedAuthorizationFilter { @Override protected String extractSpaceGuid(HttpServletRequest request) { String uri = ServletUtil.decodeUri(request); return extractSpaceGuid(ServletUtil.removeInvalidForwardSlashes(uri)); } }
MtasApiAuthorizationFilter extends SpaceGuidBasedAuthorizationFilter { @Override protected String extractSpaceGuid(HttpServletRequest request) { String uri = ServletUtil.decodeUri(request); return extractSpaceGuid(ServletUtil.removeInvalidForwardSlashes(uri)); } @Inject  MtasApiAuthorizationFilter(AuthorizationChecker authorizationChecker); }
MtasApiAuthorizationFilter extends SpaceGuidBasedAuthorizationFilter { @Override protected String extractSpaceGuid(HttpServletRequest request) { String uri = ServletUtil.decodeUri(request); return extractSpaceGuid(ServletUtil.removeInvalidForwardSlashes(uri)); } @Inject  MtasApiAuthorizationFilter(AuthorizationChecker authorizationChecker); @Override String getUriRegex(); }
MtasApiAuthorizationFilter extends SpaceGuidBasedAuthorizationFilter { @Override protected String extractSpaceGuid(HttpServletRequest request) { String uri = ServletUtil.decodeUri(request); return extractSpaceGuid(ServletUtil.removeInvalidForwardSlashes(uri)); } @Inject  MtasApiAuthorizationFilter(AuthorizationChecker authorizationChecker); @Override String getUriRegex();  }