@Controller public class DeviceEndpoint extends Object
DeviceTokenGranter
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
logger |
static String |
URL |
static String |
USER_URL |
Constructor and Description |
---|
DeviceEndpoint() |
Modifier and Type | Method and Description |
---|---|
String |
approveDevice(String userCode,
Boolean approve,
org.springframework.ui.ModelMap model,
org.springframework.security.core.Authentication auth,
javax.servlet.http.HttpSession session) |
String |
readUserCode(String userCode,
org.springframework.ui.ModelMap model,
javax.servlet.http.HttpSession session) |
String |
requestDeviceCode(String clientId,
String scope,
Map<String,String> parameters,
org.springframework.ui.ModelMap model) |
String |
requestUserCode(org.springframework.ui.ModelMap model) |
public static final String URL
public static final String USER_URL
public static final org.slf4j.Logger logger
public DeviceEndpoint()
@RequestMapping(value="/devicecode", method=POST, consumes="application/x-www-form-urlencoded", produces="application/json") public String requestDeviceCode(@RequestParam(value="client_id") String clientId, @RequestParam(name="scope",required=false) String scope, Map<String,String> parameters, org.springframework.ui.ModelMap model)
@PreAuthorize(value="hasRole(\'ROLE_USER\')") @RequestMapping(value="/device", method=GET) public String requestUserCode(org.springframework.ui.ModelMap model)
@PreAuthorize(value="hasRole(\'ROLE_USER\')") @RequestMapping(value="/device/verify", method=POST) public String readUserCode(@RequestParam(value="user_code") String userCode, org.springframework.ui.ModelMap model, javax.servlet.http.HttpSession session)
@PreAuthorize(value="hasRole(\'ROLE_USER\')") @RequestMapping(value="/device/approve", method=POST) public String approveDevice(@RequestParam(value="user_code") String userCode, @RequestParam(value="user_oauth_approval") Boolean approve, org.springframework.ui.ModelMap model, org.springframework.security.core.Authentication auth, javax.servlet.http.HttpSession session)
Copyright © 2018. All rights reserved.