JSON configuration file Management update with IDENTITYSERVER4 configuration Ocelot

Source: Internet
Author: User

Ocelot provides the Addadministration method to set the configuration route and authorization mode

Services. Addocelot (). Addadministration ("/admin", options ={options. Authority="http://localhost:30000"; Options. Apiname="Ocelotapiadmin"; Options. Supportedtokens=IdentityServer4.AccessTokenValidation.SupportedTokens.Both; Options. Apisecret="liyouming"; Options. Requirehttpsmetadata=false; });

The Addadministration provides 2 overloads

1, (Path,secret)

2, (path,identityserver4authenticationoptions)

Configure Ocelot separate authorized access scope and related clients to

So how to check, update it?

/admin/configuration directly via Gateway hosted on port 20000 address

Http://localhost:20000/admin/configuration

But before we do, we need to get the authorization code through the client assignment.

Access Ocelot configuration address after getting Accesstoken

Get all configuration files, post to/admin/configuration and modifiable

By accessing this interface in the MicroServices architecture, the Ocelot configuration of Gateway Gateways is managed with new modifications to facilitate maintenance and modification of the Ocelot routing configuration without the tedious need to modify the JSON file for each gateway

JSON configuration file Management update with IDENTITYSERVER4 configuration Ocelot

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.