@Test void testExtractSpaceGuidWithEmptyString() { Mockito.when(applicationConfiguration.getSpaceGuid()) .thenReturn(""); assertThrows(SLException.class, () -> adminApiAuthorizationFilter.extractSpaceGuid(request)); }
@Override protected String extractSpaceGuid(HttpServletRequest request) { String spaceGuid = applicationConfiguration.getSpaceGuid(); if (StringUtils.isEmpty(spaceGuid)) { throw new SLException("Could not retrieve the MTA deployer's space GUID."); } return spaceGuid; }
AdminApiAuthorizationFilter extends SpaceGuidBasedAuthorizationFilter { @Override protected String extractSpaceGuid(HttpServletRequest request) { String spaceGuid = applicationConfiguration.getSpaceGuid(); if (StringUtils.isEmpty(spaceGuid)) { throw new SLException("Could not retrieve the MTA deployer's space GUID."); } return spaceGuid; } }
AdminApiAuthorizationFilter extends SpaceGuidBasedAuthorizationFilter { @Override protected String extractSpaceGuid(HttpServletRequest request) { String spaceGuid = applicationConfiguration.getSpaceGuid(); if (StringUtils.isEmpty(spaceGuid)) { throw new SLException("Could not retrieve the MTA deployer's space GUID."); } return spaceGuid; } @Inject  AdminApiAuthorizationFilter(ApplicationConfiguration applicationConfiguration, AuthorizationChecker authorizationChecker); }
AdminApiAuthorizationFilter extends SpaceGuidBasedAuthorizationFilter { @Override protected String extractSpaceGuid(HttpServletRequest request) { String spaceGuid = applicationConfiguration.getSpaceGuid(); if (StringUtils.isEmpty(spaceGuid)) { throw new SLException("Could not retrieve the MTA deployer's space GUID."); } return spaceGuid; } @Inject  AdminApiAuthorizationFilter(ApplicationConfiguration applicationConfiguration, AuthorizationChecker authorizationChecker); @Override String getUriRegex(); }
AdminApiAuthorizationFilter extends SpaceGuidBasedAuthorizationFilter { @Override protected String extractSpaceGuid(HttpServletRequest request) { String spaceGuid = applicationConfiguration.getSpaceGuid(); if (StringUtils.isEmpty(spaceGuid)) { throw new SLException("Could not retrieve the MTA deployer's space GUID."); } return spaceGuid; } @Inject  AdminApiAuthorizationFilter(ApplicationConfiguration applicationConfiguration, AuthorizationChecker authorizationChecker); @Override String getUriRegex();  }