From 341d270c2d8b750556d9735a9a8edd8b6fab2530 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Fri, 2 Oct 2015 14:48:50 -0400 Subject: Adding doc system to build. Updated docs, fixed links. --- doc/integrations/Single-Sign-On/Gitlab.md | 19 ++++++++++ doc/integrations/sso/gitlab-sso.md | 19 ---------- doc/integrations/webhook/incoming.md | 62 ------------------------------- doc/integrations/webhooks/Incoming.md | 62 +++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+), 81 deletions(-) create mode 100644 doc/integrations/Single-Sign-On/Gitlab.md delete mode 100644 doc/integrations/sso/gitlab-sso.md delete mode 100644 doc/integrations/webhook/incoming.md create mode 100644 doc/integrations/webhooks/Incoming.md (limited to 'doc/integrations') diff --git a/doc/integrations/Single-Sign-On/Gitlab.md b/doc/integrations/Single-Sign-On/Gitlab.md new file mode 100644 index 000000000..6110db504 --- /dev/null +++ b/doc/integrations/Single-Sign-On/Gitlab.md @@ -0,0 +1,19 @@ +## Configuring GitLab Single-Sign-On + +The following steps can be used to configure Mattermost to use GitLab as a single-sign-on (SSO) service for team creation, account creation and sign-in. + +1. Login to your GitLab account and go to the Applications section either in Profile Settings or Admin Area. +2. Add a new application called "Mattermost" with the following as Redirect URIs: + * `/login/gitlab/complete` (example: http://localhost:8065/login/gitlab/complete) + * `/signup/gitlab/complete` + +3. Submit the application and copy the given _Id_ and _Secret_ into the appropriate _SSOSettings_ fields in config/config.json + +4. Also in config/config.json, set _Allow_ to `true` for the _gitlab_ section, leave _Scope_ blank and use the following for the endpoints: + * _AuthEndpoint_: `/oauth/authorize` (example http://localhost:3000/oauth/authorize) + * _TokenEndpoint_: `/oauth/token` + * _UserApiEndpoint_: `/api/v3/user` + +6. (Optional) If you would like to force all users to sign-up with GitLab only, in the _ServiceSettings_ section of config/config.json please set _DisableEmailSignUp_ to `true`. + +7. Restart your Mattermost server to see the changes take effect. diff --git a/doc/integrations/sso/gitlab-sso.md b/doc/integrations/sso/gitlab-sso.md deleted file mode 100644 index 6110db504..000000000 --- a/doc/integrations/sso/gitlab-sso.md +++ /dev/null @@ -1,19 +0,0 @@ -## Configuring GitLab Single-Sign-On - -The following steps can be used to configure Mattermost to use GitLab as a single-sign-on (SSO) service for team creation, account creation and sign-in. - -1. Login to your GitLab account and go to the Applications section either in Profile Settings or Admin Area. -2. Add a new application called "Mattermost" with the following as Redirect URIs: - * `/login/gitlab/complete` (example: http://localhost:8065/login/gitlab/complete) - * `/signup/gitlab/complete` - -3. Submit the application and copy the given _Id_ and _Secret_ into the appropriate _SSOSettings_ fields in config/config.json - -4. Also in config/config.json, set _Allow_ to `true` for the _gitlab_ section, leave _Scope_ blank and use the following for the endpoints: - * _AuthEndpoint_: `/oauth/authorize` (example http://localhost:3000/oauth/authorize) - * _TokenEndpoint_: `/oauth/token` - * _UserApiEndpoint_: `/api/v3/user` - -6. (Optional) If you would like to force all users to sign-up with GitLab only, in the _ServiceSettings_ section of config/config.json please set _DisableEmailSignUp_ to `true`. - -7. Restart your Mattermost server to see the changes take effect. diff --git a/doc/integrations/webhook/incoming.md b/doc/integrations/webhook/incoming.md deleted file mode 100644 index e391cba92..000000000 --- a/doc/integrations/webhook/incoming.md +++ /dev/null @@ -1,62 +0,0 @@ -# Incoming Webhooks - -With incoming webhooks practically any external source - once given a URL by you - can post a message to any channel you have access to. This is done through a HTTP POST request with a simple JSON payload. The payload can contain some text, and some simple options to allow the external source to customize the post. - -## Creating the Webhook URL - -To get the incoming webhook URL - where all the HTTP requests will be sent - follow these steps: - -1. Login to your Mattermost account. -2. Open the menu by clicking near your profile picture in the top-left and open Account Settings. -3. Go to the Integrations tab and click the 'Edit' button next to 'Incoming Webhooks'. -4. Use the selector to choose a channel and click the 'Add' button to create the webhook. -5. Your webhook URL will be displayed below in the 'Existing incoming webhooks' section. - - -## Posting a Message - -You can send the message by including a JSON string as the `payload` parameter in a HTTP POST request. -``` -payload={"text": "Hello, this is some text."} -``` - -In addition, if `Content-Type` is specified as `application/json` in the headers of the HTTP request then the body of the request can be direct JSON. -``` -{"text": "Hello, this is some text."} -``` - -It is also possible to post richly formatted messages using [Markdown](../../help/enduser/markdown.md). -``` -payload={"text": "# A Header\nThe _text_ below **the** header."} -``` - -Just like regular posts, the text will be limited to 4000 characters at maximum. - -## Adding Links - -In addition to including links in the standard Markdown format, links can also be specified by enclosing the URL in `<>` brackets -``` -payload={"text": ""} -``` - -They can also include a `|` character to specify some clickable text. -``` -payload={"text": "Click for a link."} -``` - -## Channel Override - -You can use a single webhook URL to post messages to different channels by overriding the channel. You can do this by adding the channel name - as it is seen in the channel URL - to the request payload. -``` -payload={"channel": "off-topic", "text": "Hello, this is some text."} -``` - -## Finishing up - -Combining everything above, here is an example message made using a curl command: - -``` -curl -i -X POST 'payload={"channel": "off-topic", "text": "Hello, this is some text."}' http://yourmattermost.com/hooks/xxxxxxxxxxxxxxxxxxxxxxxxxx -``` - -A post with that text will be made to the Off-Topic channel. diff --git a/doc/integrations/webhooks/Incoming.md b/doc/integrations/webhooks/Incoming.md new file mode 100644 index 000000000..6e25f182e --- /dev/null +++ b/doc/integrations/webhooks/Incoming.md @@ -0,0 +1,62 @@ +# Incoming Webhooks + +With incoming webhooks practically any external source - once given a URL by you - can post a message to any channel you have access to. This is done through a HTTP POST request with a simple JSON payload. The payload can contain some text, and some simple options to allow the external source to customize the post. + +## Creating the Webhook URL + +To get the incoming webhook URL - where all the HTTP requests will be sent - follow these steps: + +1. Login to your Mattermost account. +2. Open the menu by clicking near your profile picture in the top-left and open Account Settings. +3. Go to the Integrations tab and click the 'Edit' button next to 'Incoming Webhooks'. +4. Use the selector to choose a channel and click the 'Add' button to create the webhook. +5. Your webhook URL will be displayed below in the 'Existing incoming webhooks' section. + + +## Posting a Message + +You can send the message by including a JSON string as the `payload` parameter in a HTTP POST request. +``` +payload={"text": "Hello, this is some text."} +``` + +In addition, if `Content-Type` is specified as `application/json` in the headers of the HTTP request then the body of the request can be direct JSON. +``` +{"text": "Hello, this is some text."} +``` + +It is also possible to post richly formatted messages using [Markdown](../../usage/Markdown.md). +``` +payload={"text": "# A Header\nThe _text_ below **the** header."} +``` + +Just like regular posts, the text will be limited to 4000 characters at maximum. + +## Adding Links + +In addition to including links in the standard Markdown format, links can also be specified by enclosing the URL in `<>` brackets +``` +payload={"text": ""} +``` + +They can also include a `|` character to specify some clickable text. +``` +payload={"text": "Click for a link."} +``` + +## Channel Override + +You can use a single webhook URL to post messages to different channels by overriding the channel. You can do this by adding the channel name - as it is seen in the channel URL - to the request payload. +``` +payload={"channel": "off-topic", "text": "Hello, this is some text."} +``` + +## Finishing up + +Combining everything above, here is an example message made using a curl command: + +``` +curl -i -X POST 'payload={"channel": "off-topic", "text": "Hello, this is some text."}' http://yourmattermost.com/hooks/xxxxxxxxxxxxxxxxxxxxxxxxxx +``` + +A post with that text will be made to the Off-Topic channel. -- cgit v1.2.3-1-g7c22