Skip to content

Commit

Permalink
add documentation about authentication options
Browse files Browse the repository at this point in the history
Signed-off-by: Bjoern Schiessle <[email protected]>
  • Loading branch information
schiessle committed Nov 24, 2023
1 parent e9b0355 commit b8493f0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions developer_manual/client_apis/OCS/ocs-api-overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ This document provides a quick overview of the OCS API endpoints supported in Ne

All requests need to provide authentication information, either as a Basic Auth header or by passing a set of valid session cookies, if not stated otherwise.

Authentication
---------------

Authentication can happen either via username / password (or app token) or with OIDC tokens, see the examples below:


Username/Password:

.. code-block:: bash
curl -u username:password -X GET 'https://cloud.example.com/ocs/v1.php/...' -H "OCS-APIRequest: true"
OIDC Token:

.. code-block:: bash
curl -u username:password -X GET 'https://cloud.example.com/ocs/v1.php/...' -H "OCS-APIRequest: true" -H "Authorization: Bearer ID_TOKEN"
Testing requests with curl
--------------------------
Expand Down

0 comments on commit b8493f0

Please sign in to comment.