summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon C2021-01-08 14:58:01 +0100
committerDavid Mehren2021-01-11 11:12:57 +0100
commit6dab69de605a7812d95ab22dcaf2d874fe9904d4 (patch)
treea4be8736164b472cf1f168a2a55f6107641931ce
parent5bdb39241374afc3da801a4032ebc306f8562035 (diff)
docs: Fix indentation of code
(cherry picked from commit 4559d52d521939739b0d3aad0c84e39d2aa5c960) Signed-off-by: David Mehren <git@herrmehren.de>
-rw-r--r--docs/content/guides/auth/nextcloud.md55
1 files changed, 32 insertions, 23 deletions
diff --git a/docs/content/guides/auth/nextcloud.md b/docs/content/guides/auth/nextcloud.md
index e0eb28d1..db13774d 100644
--- a/docs/content/guides/auth/nextcloud.md
+++ b/docs/content/guides/auth/nextcloud.md
@@ -1,8 +1,13 @@
# Authentication guide - Nextcloud (self-hosted)
-*This has been constructed using the [Nextcloud OAuth2 Documentation](https://docs.nextcloud.com/server/14/admin_manual/configuration_server/oauth2.html?highlight=oauth2) combined with [this issue comment on the nextcloud bugtracker](https://github.com/nextcloud/server/issues/5694#issuecomment-314761326).*
+*This has been constructed using
+the [Nextcloud OAuth2 Documentation](https://docs.nextcloud.com/server/14/admin_manual/configuration_server/oauth2.html?highlight=oauth2)
+combined
+with [this issue comment on the nextcloud bugtracker](https://github.com/nextcloud/server/issues/5694#issuecomment-314761326)
+.*
-This guide uses the generic OAuth2 module for compatibility with Nextcloud 13 and above (this guide has been tested successfully with Nextcloud 14).
+This guide uses the generic OAuth2 module for compatibility with Nextcloud 13 and above (this guide has been tested
+successfully with Nextcloud 14 and Nextcloud 20).
1. Sign-in with an administrator account to your Nextcloud server
@@ -18,35 +23,39 @@ This guide uses the generic OAuth2 module for compatibility with Nextcloud 13 an
4. You'll now see a line containing a *client identifier* and a *Secret*.
![Successfully added OAuth2-client](../../images/auth/nextcloud-oauth2-3-clientid-secret.png)
-5. That's it for Nextcloud, the rest is configured in your HedgeDoc `config.json` or via the `CMD_` environment variables!
+5. That's it for Nextcloud, the rest is configured in your HedgeDoc `config.json` or via the `CMD_` environment
+ variables!
-6. Add the Client ID and Client Secret to your `config.json` file or pass them as environment variables. Make sure you also replace `<your-nextcloud-domain>` with the right domain name.
+6. Add the Client ID and Client Secret to your `config.json` file or pass them as environment variables. Make sure you
+ also replace `<your-nextcloud-domain>` with the right domain name.
- `config.json`:
+
```javascript
{
"production": {
"oauth2": {
- "clientID": "ii4p1u3jz7dXXXXXXXXXXXXXXX",
- "clientSecret": "mqzzx6fydbXXXXXXXXXXXXXXXX",
- "authorizationURL": "https://<your-nextcloud-domain>/apps/oauth2/authorize",
- "tokenURL": "https://<your-nextcloud-domain>/apps/oauth2/api/v1/token",
- "userProfileURL": "https://<your-nextcloud-domain>/ocs/v2.php/cloud/user?format=json",
- "userProfileUsernameAttr": "ocs.data.id",
- "userProfileDisplayNameAttr": "ocs.data.display-name",
- "userProfileEmailAttr": "ocs.data.email"
+ "clientID": "ii4p1u3jz7dXXXXXXXXXXXXXXX",
+ "clientSecret": "mqzzx6fydbXXXXXXXXXXXXXXXX",
+ "authorizationURL": "https://<your-nextcloud-domain>/apps/oauth2/authorize",
+ "tokenURL": "https://<your-nextcloud-domain>/apps/oauth2/api/v1/token",
+ "userProfileURL": "https://<your-nextcloud-domain>/ocs/v2.php/cloud/user?format=json",
+ "userProfileUsernameAttr": "ocs.data.id",
+ "userProfileDisplayNameAttr": "ocs.data.display-name",
+ "userProfileEmailAttr": "ocs.data.email"
}
}
}
```
- - environment variables:
- ```sh
- CMD_OAUTH2_CLIENT_ID=ii4p1u3jz7dXXXXXXXXXXXXXXX
- CMD_OAUTH2_CLIENT_SECRET=mqzzx6fydbXXXXXXXXXXXXXXXX
- CMD_OAUTH2_AUTHORIZATION_URL=https://<your-nextcloud-domain>/apps/oauth2/authorize
- CMD_OAUTH2_TOKEN_URL=https://<your-nextcloud-domain>/apps/oauth2/api/v1/token
- CMD_OAUTH2_USER_PROFILE_URL=https://<your-nextcloud-domain>/ocs/v2.php/cloud/user?format=json
- CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR=ocs.data.id
- CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR=ocs.data.display-name
- CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR=ocs.data.email
- ```
+ - environment variables:
+
+ ```sh
+ CMD_OAUTH2_CLIENT_ID=ii4p1u3jz7dXXXXXXXXXXXXXXX
+ CMD_OAUTH2_CLIENT_SECRET=mqzzx6fydbXXXXXXXXXXXXXXXX
+ CMD_OAUTH2_AUTHORIZATION_URL=https://<your-nextcloud-domain>/apps/oauth2/authorize
+ CMD_OAUTH2_TOKEN_URL=https://<your-nextcloud-domain>/apps/oauth2/api/v1/token
+ CMD_OAUTH2_USER_PROFILE_URL=https://<your-nextcloud-domain>/ocs/v2.php/cloud/user?format=json
+ CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR=ocs.data.id
+ CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR=ocs.data.display-name
+ CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR=ocs.data.email
+ ```