Documentation for #2397

This commit is contained in:
Maxime Besson 2021-01-19 16:36:06 +01:00
parent 92c20740fb
commit 3a1765d14e

View File

@ -39,6 +39,23 @@ Example:
user: "dwho"
}
Additional variables
--------------------
The OAuth2 handler defines a few extra variables that you can use in
:doc:`rules and headers<writingrulesand_headers>`.
* ``$_clientId``: client ID of the application which requested the Access Token
* ``$_clientConfKey``: configuration key of the application which requested the
Access Token
* ``$_scope``: list of space-separated scopes granted by the Access Token
For example, to grant access to access tokens containing the ``write`` scope,
use ::
$_scope =~ /(?<!\S)write(?!\S)/
Configuration
-------------