Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] add documentation about authentication options #11313

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 -X GET 'https://cloud.example.com/ocs/v1.php/...' -H "OCS-APIRequest: true" -H "Authorization: Bearer ID_TOKEN"

Testing requests with curl
--------------------------
Expand Down