标签:csdn .post span arguments 服务 on() UI stc runtime
方法一:AOP
代码如下定义一个权限注解
获取页面请求中的ID token
token验证类 存储用到redis
spring aop配置
验证权限方法使用 直接用注解就可以了AccessToken
例如
方法二: MVC拦截器
服务器:
拼接token之外所有参数,最后拼接token_key,做MD5,与token参数比对
如果token比对失败返回状态码 500
spring-config.xml配置中加入
客户端:
拼接请求接口的所有参数,最后拼接token_key,做MD5,作为token参数
请求样例:http://127.0.0.1:8080/interface/api?key0=param0&key1=param1&token=md5(concat(param0, param1))
标签:csdn .post span arguments 服务 on() UI stc runtime
原文地址:http://www.cnblogs.com/barrywxx/p/6964423.html