标签:cli tar word 业务 play 技术分享 dash log inf
del /q D:\tools\Tomcat8.0\webapps\spring-oauth-client.war
del /q D:\tools\Tomcat8.0\webapps\spring-oauth-client
copy D:\workspace_SpringMybatis\spring-oauth-client\target\spring-oauth-client.war D:\tools\Tomcat8.0\webapps\spring-oauth-client.war
http://localhost:8080/spring-oauth-client/index.jsp
2、服务端工程导入和配置
del /q D:\tools\Tomcat8.0\webapps\spring-oauth-server.war
del /q D:\tools\Tomcat8.0\webapps\spring-oauth-server
copy D:\workspace_SpringMybatis\spring-oauth-server\target\spring-oauth-server.war D:\tools\Tomcat8.0\webapps\spring-oauth-server.war
http://localhost:8080/spring-oauth-server/index.jsp
http://localhost:8080/spring-oauth-client/index.jsp
得到access_token
在服务端找到业务链接:http://localhost:8080/spring-oauth-server/m/dashboard?access_token=i_am_testing_access_token
注意请求受保护的资源时传递 Access Token 有两种方式
access_token,即请求参数:<access_token,your_access_token>
请求参数方式:
http://localhost:8080/spring-oauth-server/m/dashboard?access_token=942090fc-1aa0-4444-8127-57214680df3b
请求头方式:
请求头:Authorization=bearer942090fc-1aa0-4444-8127-57214680df3b
http://localhost:8080/spring-oauth-server/m/dashboard
返回业务结果如下:
http://localhost:8080/spring-oauth-server/m/dashboard
spring-oauth-server实践:客户端和服务端环境搭建
标签:cli tar word 业务 play 技术分享 dash log inf
原文地址:http://www.cnblogs.com/lexiaofei/p/7223928.html