mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 11:58:15 +08:00
hacked together load balancing reroutes in fileconfig (#211)
* hacked together load balancing reroutes in fileconfig * some renaming and refactoring * more renames * hacked away the old config json * test for issue 213 * renamed key * dont share ports * oops * updated docs * mvoed docs around * port being used
This commit is contained in:
@ -1,18 +1,18 @@
|
||||
Authorisation
|
||||
=============
|
||||
|
||||
Ocelot supports claims based authorisation which is run post authentication. This means if
|
||||
you have a route you want to authorise you can add the following to you ReRoute configuration.
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
"RouteClaimsRequirement": {
|
||||
"UserType": "registered"
|
||||
}
|
||||
|
||||
In this example when the authorisation middleware is called Ocelot will check to see
|
||||
if the user has the claim type UserType and if the value of that claim is registered.
|
||||
If it isn't then the user will not be authorised and the response will be 403 forbidden.
|
||||
|
||||
|
||||
|
||||
Authorisation
|
||||
=============
|
||||
|
||||
Ocelot supports claims based authorisation which is run post authentication. This means if
|
||||
you have a route you want to authorise you can add the following to you ReRoute configuration.
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
"RouteClaimsRequirement": {
|
||||
"UserType": "registered"
|
||||
}
|
||||
|
||||
In this example when the authorisation middleware is called Ocelot will check to see
|
||||
if the user has the claim type UserType and if the value of that claim is registered.
|
||||
If it isn't then the user will not be authorised and the response will be 403 forbidden.
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user