@RequestMapping(value = "/approveRequests", method = RequestMethod.GET) @ResponseBody public List<AuthorizationApplications> listAreqs() { Subject subject = SecurityUtils.getSubject(); String username = (String) subject.getPrincipal(); return oauthorizationApplicationsService.findWaitForApproveByResourceOwner(username); }
@RequestMapping(value = "/{id}/deal", method = RequestMethod.GET) public String listAreqs( @PathVariable("id") Long id, Model model, @RequestParam(value = "result") int result) { Subject subject = SecurityUtils.getSubject(); String username = (String) subject.getPrincipal(); oauthorizationApplicationsService.updateStatusById( id, username, AuthorizationStatus.fromElem(result)); return "redirect:/client/approveRequests"; }