Loading gms/src/main/java/it/inaf/ia2/gms/controller/JWTWebServiceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ public class JWTWebServiceController { response.setStatus(HttpServletResponse.SC_NO_CONTENT); } @GetMapping(value = {"/permission/{group:.+}", "/permission/"}, produces = MediaType.TEXT_PLAIN_VALUE) @GetMapping(value = {"/permission/{group:.+}", "/permission"}, produces = MediaType.TEXT_PLAIN_VALUE) public void getUserPermission(@PathVariable("group") Optional<String> groupNames, @RequestParam("user_id") Optional<String> userId, HttpServletRequest request, HttpServletResponse response) throws IOException { if (userId.isPresent()) { Loading gms/src/main/java/it/inaf/ia2/gms/rap/RapClient.java +2 −2 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ public class RapClient { try { return function.apply(getEntity(body)); } catch (HttpClientErrorException.Unauthorized ex) { if (sessionData == null) { if (request.getSession(false) == null) { // we can't refresh the token without a session throw ex; } Loading @@ -116,7 +116,7 @@ public class RapClient { HttpHeaders headers = new HttpHeaders(); headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON)); if (sessionData != null) { if (request.getSession(false) != null) { headers.add("Authorization", "Bearer " + sessionData.getAccessToken()); } else { // from JWT web service Loading Loading
gms/src/main/java/it/inaf/ia2/gms/controller/JWTWebServiceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ public class JWTWebServiceController { response.setStatus(HttpServletResponse.SC_NO_CONTENT); } @GetMapping(value = {"/permission/{group:.+}", "/permission/"}, produces = MediaType.TEXT_PLAIN_VALUE) @GetMapping(value = {"/permission/{group:.+}", "/permission"}, produces = MediaType.TEXT_PLAIN_VALUE) public void getUserPermission(@PathVariable("group") Optional<String> groupNames, @RequestParam("user_id") Optional<String> userId, HttpServletRequest request, HttpServletResponse response) throws IOException { if (userId.isPresent()) { Loading
gms/src/main/java/it/inaf/ia2/gms/rap/RapClient.java +2 −2 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ public class RapClient { try { return function.apply(getEntity(body)); } catch (HttpClientErrorException.Unauthorized ex) { if (sessionData == null) { if (request.getSession(false) == null) { // we can't refresh the token without a session throw ex; } Loading @@ -116,7 +116,7 @@ public class RapClient { HttpHeaders headers = new HttpHeaders(); headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON)); if (sessionData != null) { if (request.getSession(false) != null) { headers.add("Authorization", "Bearer " + sessionData.getAccessToken()); } else { // from JWT web service Loading