public class SingleAppAuthentication extends Authentication
httpServletRequest, httpServletResponse| Constructor and Description |
|---|
SingleAppAuthentication(String appId,
String appKey) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getData(Class<T> tClass)
获取认证时存储的数据
|
AuthUser |
getUser() |
boolean |
isAuthenticated()
判断是否认证
发生在请求到达service之前
|
Object |
resolveResponse(Object responseObject) |
void |
signIn(AuthUser user,
Object data,
int expires)
用户登录
|
void |
signOut()
用户登出
|
boolean |
validateRequest(Object requestObject)
验证请求过来的数据,非HttpRequest,是通过http请求来的数据构造出来的对象。
这里主要用于验证数据的签名是否正确
|
createWithConf, getRequest, getResponsepublic boolean isAuthenticated()
AuthenticationisAuthenticated in class Authenticationpublic boolean validateRequest(Object requestObject)
AuthenticationvalidateRequest in class Authenticationpublic Object resolveResponse(Object responseObject) throws Exception
resolveResponse in class AuthenticationExceptionpublic AuthUser getUser()
getUser in class Authenticationpublic <T> T getData(Class<T> tClass)
AuthenticationgetData in class Authenticationpublic void signIn(AuthUser user, Object data, int expires) throws Exception
AuthenticationsignIn in class AuthenticationExceptionpublic void signOut()
AuthenticationsignOut in class AuthenticationCopyright © 2019. All rights reserved.