@Controller
@RequestMapping(value="/rest/system/token")
public class RESTController
extends java.lang.Object
implements org.springframework.security.authentication.AuthenticationTrustResolver
| Constructor and Description |
|---|
RESTController() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<java.lang.String> |
getAccessToken(javax.servlet.http.HttpServletResponse response,
java.lang.String name,
java.lang.String secret,
java.lang.String contextPath,
javax.servlet.http.HttpServletRequest request)
token获取
|
boolean |
isAnonymous(org.springframework.security.core.Authentication authentication) |
boolean |
isRememberMe(org.springframework.security.core.Authentication authentication) |
static void |
main(java.lang.String[] args) |
@RequestMapping(method=POST)
public org.springframework.http.ResponseEntity<java.lang.String> getAccessToken(javax.servlet.http.HttpServletResponse response,
@RequestParam(value="name",required=true)
java.lang.String name,
@RequestParam(value="secret",required=true)
java.lang.String secret,
@RequestParam(value="contextPath",required=false)
java.lang.String contextPath,
javax.servlet.http.HttpServletRequest request)
name - 客户端名称secret - 客户端秘钥contextPath - 服务请求的根访问路径,特殊场景下使用,通常不使用request - public boolean isAnonymous(org.springframework.security.core.Authentication authentication)
isAnonymous in interface org.springframework.security.authentication.AuthenticationTrustResolverpublic boolean isRememberMe(org.springframework.security.core.Authentication authentication)
isRememberMe in interface org.springframework.security.authentication.AuthenticationTrustResolverpublic static void main(java.lang.String[] args)