Java Code Examples for org.springframework.security.oauth2.provider.AuthorizationRequest#getClientId()
The following examples show how to use
org.springframework.security.oauth2.provider.AuthorizationRequest#getClientId() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AccessConfirmationController.java From osiam with MIT License | 6 votes |
@RequestMapping("/confirm_access") public ModelAndView getAccessConfirmation(Map<String, Object> model) { AuthorizationRequest clientAuth = (AuthorizationRequest) model.remove("authorizationRequest"); if (clientAuth == null) { return new ModelAndView("redirect:/oauth/error"); } String clientId = clientAuth.getClientId(); ClientDetails client = clientDetailsService.loadClientByClientId(clientId); if (client == null) { return new ModelAndView("redirect:/oauth/error"); } model.put("auth_request", clientAuth); model.put("client", client); model.put("loginError", false); return new ModelAndView("access_confirmation", model); }
Example 2
Source File: BootGrantController.java From oauth-boot with MIT License | 5 votes |
@RequestMapping("/custom/confirm_access") public String getAccessConfirmation(Map<String, Object> param, HttpServletRequest request, Model model) throws Exception { AuthorizationRequest authorizationRequest = (AuthorizationRequest) param.get("authorizationRequest"); if (authorizationRequest==null){ return "redirect:"+properties.getLoginPage(); } String clientId = authorizationRequest.getClientId(); model.addAttribute("scopes",authorizationRequest.getScope()); Client client = this.clientService.findClientByClientId(clientId); model.addAttribute("client",client); return "base-grant"; }