Add OAuth2 docs

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma
2018-05-31 11:27:45 +02:00
committed by Morris Jobke
parent 6f0cf9adc3
commit 6e6eaf20d4
2 changed files with 37 additions and 0 deletions

View File

@@ -21,5 +21,6 @@ Server configuration
automatic_configuration
server_tuning
theming
oauth2
.. Intentional disabled antivirus_configuration

View File

@@ -0,0 +1,36 @@
======
OAuth2
======
Nextcloud allows connecting external services (for example Moodle) to your Nextcloud.
This is done via OAuth2. See `RFC6749 <https://tools.ietf.org/html/rfc6749>`_ for the
OAuth2 specification.
Note: Nextcloud only supports confidential clients.
Add an OAuth2 Application
-------------------------
Head over to your Administrator Security Settings. Here you can add a new OAuth2 client.
TODO: Figure
Enter a name. And a redirection url.
You should now have a Client Identifier and Secret. Enter those into your OAuth2 client.
As well as:
Authorization endpoint: SERVER/apps/oauth2/authorize
Token endpoint: SERVER/apps/oauth2/api/v1/token
The access token
----------------
The access token obtained is a so called Bearer token. Which means that for request to the
Nextcloud server you will have to send the proper authorization header.
Authorization: Bearer <TOKEN>
Note that apache by default strips this. Make sure you have mod_rewrite and mod_env enabled.