Skip to content

Commit e1e11cb

Browse files
committed
docs: Describe the requireClientAuthentication server option
1 parent 9354626 commit e1e11cb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/api/oauth2-server.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,15 @@ The returned ``Promise`` **must** be ignored if ``callback`` is used.
258258

259259
If ``options.allowExtendedTokenAttributes`` is ``true`` any additional properties set on the object returned from :ref:`Model#saveToken() <Model#saveToken>` are copied to the token response sent to the client.
260260

261-
.. todo:: ``options.requireClientAuthentication``
261+
By default all grant types require the client to send it's ``client_secret`` with the token request. ``options.requireClientAuthentication`` can be used to disable this check for selected grants. If used, this server option must be an object containing properties set to ``true`` or ``false``. Possible keys for the object include all supported values for the token request's ``grant_type`` field (``authorization_code``, ``client_credentials``, ``password`` and ``refresh_token``). Grants that are not specified default to ``true`` which enables verification of the ``client_secret``.
262+
263+
::
264+
265+
let options = {
266+
// ...
267+
// Allow token requests using the password grant to not include a client_secret.
268+
requireClientAuthentication: {password: false}
269+
};
262270

263271
``options.extendedGrantTypes`` is an object mapping extension grant URIs to handler types, for example:
264272

0 commit comments

Comments
 (0)