Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
ed9ba788
Commit
ed9ba788
authored
May 03, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mention that `credentials_url` can/should be used with `auto_login`
parent
7c057910
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
docs/source/configuration.rst
docs/source/configuration.rst
+10
-1
docs/source/events.rst
docs/source/events.rst
+3
-2
No files found.
docs/source/configuration.rst
View file @
ed9ba788
...
...
@@ -250,7 +250,12 @@ soon as the page loads.
It should be used either with ``authentication`` set to ``anonymous`` or to ``login``.
If ``authentication`` is set to ``login``, then you will also need to provide a
valid ``jid`` and ``password`` values.
valid ``jid`` and ``password`` values, either manually by passing them in, or
by the `credentials_url`_ setting. Setting a ``credentials_url`` is preferable
to manually passing in ``jid`` and ``password`` values, because it allows
better reconnection with ``auto_reconnect``. When the connection drops,
converse.js will automatically fetch new login credentials from the
``credentials_url`` and reconnect.
If ``authentication`` is set to ``anonymous``, then you will also need to provide the
server's domain via the `jid`_ setting.
...
...
@@ -437,6 +442,10 @@ It allows you to specify a URL which converse.js will call when it needs to get
the username and password (or authentication token) which converse.js will use
to automatically log the user in.
If ``auto_reconnect`` is also set to true, then converse.js will automatically
fetch new credentials from the ``credentials_url`` whenever the connection or
session drops, and then attempt to reconnect and establish a new session.
The server behind ``credentials_url`` should return a JSON encoded object::
{
...
...
docs/source/events.rst
View file @
ed9ba788
...
...
@@ -151,7 +151,8 @@ Once a message has been added to a chat box. The passed in data object contains
a `chatbox` attribute, referring to the chat box receiving the message, as well
as a `message` attribute which refers to the Message model.
.. code-block:: javascript
.. code-block:: javascript
_converse.on('messageAdded', function (data) {
// The message is at `data.message`
// The original chat box is at `data.chatbox`.
...
...
@@ -289,4 +290,4 @@ windowStateChanged
When window state has changed. Used to determine when a user left the page and when came back.
``_converse.on('windowStateChanged', function (data) { ... });``
\ No newline at end of file
``_converse.on('windowStateChanged', function (data) { ... });``
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment