First, create a gateway sideways 1, Client identity (oauth_client_details) 1.1, data structure
1.2. Interface code<form id= "formdto" class= "form-horizontal" action= "/spring-oauth-server/register_ Client " method="post ">
1.3. Backstage Code
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 (?, ?,?,?,?,?,?,?,?,?,?,?)";
second, how to create1. Build values for each parameter
Assign the following values to the corresponding HTTP parameters:
client_id: Random client_id resource_ids: ' Apigw-resource ' client_secret: ' Random cipher string ' scope: ' [Read,write] ' authorized_grant_ty PES: ' Client_credentials,refresh_token ' Web_server_redirect_uri: ' Authorities: ' ROLE_APIGW ' Access_token_ validity:155520000refresh_token_validity:155520000 additional_information: "Trusted:0autoapprove:false2, get the gateway address, Stitching on '/register_client ', post mode initiatedHTTP calls (gateway address support configurable)
Api-gateway Practice (12) New service gateway-approval to generate gateway identity!