Skip to content

Dynamic routes are unable to utilize AuthenticationOptions for global authentication #2316

@yuzhu666

Description

@yuzhu666
{
  "Routes": [],
  "Aggregates": [],
  "GlobalConfiguration": {
    "RequestIdKey": null,
    "ServiceDiscoveryProvider": {
      "Host": "localhost",
      "Port": 8500,
      "Type": "Consul",
      "Token": null,
      "ConfigurationKey": null
    },
    "RateLimitOptions": {
      "ClientIdHeader": "ClientId",
      "QuotaExceededMessage": null,
      "RateLimitCounterPrefix": "ocelot",
      "DisableRateLimitHeaders": false,
      "HttpStatusCode": 429
    },
    "QoSOptions": {
      "ExceptionsAllowedBeforeBreaking": 0,
      "DurationOfBreak": 0,
      "TimeoutValue": 0
    },
    "BaseUrl": null,
    "LoadBalancerOptions": {
      "Type": "LeastConnection",
      "Key": null,
      "Expiry": 0
    },
    "DownstreamScheme": "http",
    "HttpHandlerOptions": {
      "AllowAutoRedirect": false,
      "UseCookieContainer": false,
      "UseTracing": false
    },
    "AuthenticationOptions": {
      "AuthenticationProviderKey": "MyKey", //指定一个key
      "AllowedScopes": [ "apiScopes" ] //id4的作用域名称
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    AuthenticationOcelot feature: AuthenticationAutumn'25Autumn 2025 releaseConfigurationOcelot feature: ConfigurationfeatureA new featuregood first issueShould be pretty easy to dohelp wantedNot actively being worked on. If you plan to contribute, please drop a note.medium effortLikely a few days of development effort

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions