pusher-chatkit-server
Advanced tools
Changelog
0.12.0 - 2018-04-23
authenticate
now returns an object like this:{
"status": 200,
"headers": {
"Some-Header": "some-value"
},
"body": {
"access_token": "an.access.token",
"token_type": "bearer",
"expires_in": 86400
}
}
where:
status
is the suggested HTTP response status code,headers
are the suggested response headers,body
holds the token payload.If there's an error with the authentication process then the return value will be the same but with a different body
. For example:
{
"status": 422,
"headers": {
"Some-Header": "some-value"
},
"body": {
"error": "token_provider/invalid_grant_type",
"error_description": "The grant_type provided, some-invalid-grant-type, is unsupported"
}
}
If your client devices are running the:
>= 0.8.0
of chatkit-swift.Changelog
0.11.0 - 2018-04-09
Some examples:
authenticate
used to be called like this:
chatkit.authenticate("my-user-id", { grant_type: "client_credentials" })
and the new version is called like this:
chatkit.authenticate({
userId: "my-user-id",
authPayload: { grant_type: "client_credentials" },
})
createUser
used to be called like this:
chatkit.createRoom("ham", "New room")
and the new version is called like this:
chatkit.createRoom({
creatorId: "ham",
name: "New room",
})
authenticate
no longer requires the grant_type
to be specified. If no value for it is provided then it will take a default value of client_credentials
(which was already the implicit default provided by clients)Changelog
0.9.0 - 2018-01-16
updateGlobalRoomPermissions
examplecreateUser
the promise that is returned now resolves with the JSON response from the API (which contains the user information), if the request succeeds