diff options
author | David Mehren | 2020-07-10 19:59:32 +0200 |
---|---|---|
committer | GitHub | 2020-07-10 19:59:32 +0200 |
commit | 3db8b0df43b027d15d13047e25617266ddc57f13 (patch) | |
tree | da64f90f7cd4ab4c1deaf67a572a45c2a583dc7e /docs/guides/auth/mattermost-self-hosted.md | |
parent | 0b7dbd1f43899b4321ddf41bf98a64a7bd5fa48d (diff) | |
parent | 89895cef2e5785134bf1fdcc9c8813831c07f17b (diff) |
Merge pull request #410 from oupala/feature/markdown-linting
Diffstat (limited to 'docs/guides/auth/mattermost-self-hosted.md')
-rw-r--r-- | docs/guides/auth/mattermost-self-hosted.md | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/docs/guides/auth/mattermost-self-hosted.md b/docs/guides/auth/mattermost-self-hosted.md index d8280399..5085b4e7 100644 --- a/docs/guides/auth/mattermost-self-hosted.md +++ b/docs/guides/auth/mattermost-self-hosted.md @@ -1,15 +1,16 @@ -Authentication guide - Mattermost (self-hosted) -=== +# Authentication guide - Mattermost (self-hosted) **Note:** *The Mattermost setup portion of this document is just a quick guide. See the [official documentation](https://docs.mattermost.com/developer/oauth-2-0-applications.html) for more details.* This guide uses the generic OAuth2 module for compatibility with Mattermost version 5.0 and above. 1. Sign-in with an administrator account to your Mattermost instance + 2. Make sure **OAuth 2.0 Service Provider** is enabled in the Main Menu (menu button next to your username in the top left corner) --> System Console --> Custom Integrations menu, which you can find at `https://your.mattermost.domain/admin_console/integrations/custom` ![mattermost-enable-oauth2](../../images/auth/mattermost-enable-oauth2.png) 3. Navigate to the OAuth integration settings through Main Menu --> Integrations --> OAuth 2.0 Applications, at `https://your.mattermost.domain/yourteam/integrations/oauth2-apps` + 4. Click on the **Add OAuth 2.0 Application** button to add a new OAuth application ![mattermost-oauth-app-add](../../images/auth/mattermost-oauth-app-add.png) @@ -22,25 +23,26 @@ This guide uses the generic OAuth2 module for compatibility with Mattermost vers ![mattermost-oauth-app-done](../../images/auth/mattermost-oauth-app-done.png) 7. Add the Client ID and Client Secret to your config.json file or pass them as environment variables - * `config.json`: - ```javascript - { - "production": { - "oauth2": { - "baseURL": "https://your.mattermost.domain", - "userProfileURL": "https://your.mattermost.domain/api/v4/users/me", - "userProfileUsernameAttr": "id", - "userProfileDisplayNameAttr": "username", - "userProfileEmailAttr": "email", - "tokenURL": "https://your.mattermost.domain/oauth/access_token", - "authorizationURL": "https://your.mattermost.domain/oauth/authorize", - "clientID": "ii4p1u3jz7dXXXXXXXXXXXXXXX", - "clientSecret": "mqzzx6fydbXXXXXXXXXXXXXXXX" - } + - `config.json`: + ```javascript + { + "production": { + "oauth2": { + "baseURL": "https://your.mattermost.domain", + "userProfileURL": "https://your.mattermost.domain/api/v4/users/me", + "userProfileUsernameAttr": "id", + "userProfileDisplayNameAttr": "username", + "userProfileEmailAttr": "email", + "tokenURL": "https://your.mattermost.domain/oauth/access_token", + "authorizationURL": "https://your.mattermost.domain/oauth/authorize", + "clientID": "ii4p1u3jz7dXXXXXXXXXXXXXXX", + "clientSecret": "mqzzx6fydbXXXXXXXXXXXXXXXX" } } - ``` - * environment variables: + } + ``` + + - environment variables: ```sh CMD_OAUTH2_BASEURL=https://your.mattermost.domain CMD_OAUTH2_USER_PROFILE_URL=https://your.mattermost.domain/api/v4/users/me |