From fad1f72df8b56245b1de3d79bf566560889b6e93 Mon Sep 17 00:00:00 2001 From: vaivars Date: Wed, 29 Jul 2020 19:53:39 +0300 Subject: [PATCH 1/2] Add a secondary option on how to get access token Potentially the CURLing could be a better approach, since then you don't leave spare sessions hanging. --- docs/configuring-playbook-dimension.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/configuring-playbook-dimension.md b/docs/configuring-playbook-dimension.md index 9b9c09e7a..10276e7cd 100644 --- a/docs/configuring-playbook-dimension.md +++ b/docs/configuring-playbook-dimension.md @@ -37,7 +37,8 @@ We recommend that you create a dedicated Matrix user for Dimension (`dimension` Follow our [Registering users](registering-users.md) guide to learn how to register **a regular (non-admin) user**. You are required to specify an access token (belonging to this new user) for Dimension to work. -To get an access token for the Dimension user, follow these steps: +To get an access token for the Dimension user, you can follow one of two options: +*Through an interactive login*: 1. In a private browsing session (incognito window), open Element. 2. Log in with the `dimension` user and its password. @@ -46,6 +47,17 @@ To get an access token for the Dimension user, follow these steps: 3. Copy the highlighted text to your configuration. 4. Close the private browsing session. **Do not log out**. Logging out will invalidate the token, making it not work. +*With CURL* + +``` +curl -X POST --header 'Content-Type: application/json' -d '{ + "identifier": { "type": "m.id.user", "user": "YourDimensionUsername" }, + "password": "YourDimensionPassword", + "type": "m.login.password" +}' 'http://localhost:8008/_matrix/client/r0/login' +``` +*Change the "YourDimensionUser/Pass" accordingly* + **Access tokens are sensitive information. Do not include them in any bug reports, messages, or logs. Do not share the access token with anyone.** Add access token to your configuration file (`inventory/host_vars/matrix./vars.yml`): From e73b8633295655e06c59a19f635e2cc16d1d6b3c Mon Sep 17 00:00:00 2001 From: vaivars Date: Thu, 30 Jul 2020 10:52:49 +0300 Subject: [PATCH 2/2] Change the url to reflect the most common usecase --- docs/configuring-playbook-dimension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/configuring-playbook-dimension.md b/docs/configuring-playbook-dimension.md index 10276e7cd..2b6b30ed4 100644 --- a/docs/configuring-playbook-dimension.md +++ b/docs/configuring-playbook-dimension.md @@ -54,9 +54,9 @@ curl -X POST --header 'Content-Type: application/json' -d '{ "identifier": { "type": "m.id.user", "user": "YourDimensionUsername" }, "password": "YourDimensionPassword", "type": "m.login.password" -}' 'http://localhost:8008/_matrix/client/r0/login' +}' 'https://matrix.YOURDOMAIN/_matrix/client/r0/login' ``` -*Change the "YourDimensionUser/Pass" accordingly* +*Change the "YourDimensionUser/Pass" URL accordigly* **Access tokens are sensitive information. Do not include them in any bug reports, messages, or logs. Do not share the access token with anyone.**