标签:style ati 创建 .com 服务 gis font types com
一、创建网关侧身份
1、client身份(oauth_client_details)
1.1、数据结构
1.2、界面代码
<form id="formDto" class="form-horizontal" action="/spring-oauth-server/register_client" method="post">
1.3、后台代码
final String sql = " insert into oauth_client_details(client_id,resource_ids,client_secret,scope,authorized_grant_types,web_server_redirect_uri," +
" authorities,access_token_validity,refresh_token_validity,additional_information,trusted,autoapprove) values (?,?,?,?,?,?,?,?,?,?,?,?)";
二、如何创建
1、构建各个参数的值
为相应的http参数赋如下值:
client_id:随机client_id
resource_ids:‘apigw-resource’
client_secret:‘随机密码串‘
scope:‘[read,write]‘
authorized_grant_types:‘client_credentials,refresh_token‘
web_server_redirect_uri:‘’
authorities:‘ROLE_APIGW‘
access_token_validity:155520000
refresh_token_validity:155520000
additional_information:‘’
trusted:0
autoapprove:false
2、获取网关地址,拼接上‘/register_client‘, post方式发起http调用(网关地址支持可配置)
api-gateway实践(12)新服务网关 - 审批产生网关身份!
标签:style ati 创建 .com 服务 gis font types com
原文地址:http://www.cnblogs.com/lexiaofei/p/7154442.html