Api-gateway Practice (12) New service gateway-approval to generate gateway identity!

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.