Ocelot
Ocelot copied to clipboard
#842 #1414 `AuthenticationOptions` in global configuration
Closes #842 #1414
- #842
- #1414
Proposed Changes
It is possible to configure AuthenticationOptions
in GlobalConfiguration
. Then all routes use these settings. To configure an exception to this rule (e.g. for identity service), AllowAnonymous
property should be set to true in the route AuthenticationOptions
.
If a route has its own AuthenticationOptions
with AuthenticationProviderKey
/AuthenticationProviderKeys
configured additionally, it has priority over the global one.
At the moment if a route uses a global AuthenticationProviderKey
/AuthenticationProviderKeys
(when AuthenticationProviderKey
/AuthenticationProviderKeys
is not configured for route explicitly), it uses also global AllowedScopes
, even if AllowedScopes
is configured for the route additionally.
Note
This PR was prepared 4 years ago →
- #1215
The revival of the Ocelot brought many changes, also tightly connected with the PR code. Now there is additional property: AuthenticationProviderKeys
. The merge was so hard that I created the PR from scratch and tried to apply all the code review comments.