|
1 | 1 | # Pusher React Native Websocket Client
|
| 2 | + |
| 3 | +[](https://github.com/pusher/pusher-websocket-react-native/releases) |
2 | 4 | [](http://twitter.com/Pusher)
|
3 | 5 | [](https://raw.githubusercontent.com/pusher/pusher-websocket-react-native/master/LICENSE)
|
4 | 6 | [](https://badge.fury.io/js/@pusher%2Fpusher-websocket-react-native)
|
@@ -38,7 +40,6 @@ a minimal application to connect to a channel and send events.
|
38 | 40 | - [Configuration](#configuration)
|
39 | 41 | - [`activityTimeout (double)`](#activitytimeout-double)
|
40 | 42 | - [`apiKey (string)`](#apikey-string)
|
41 |
| - - [`authParams (Map)`](#authparams-map) |
42 | 43 | - [`authEndpoint (string)`](#authendpoint-string)
|
43 | 44 | - [`cluster (string)`](#cluster-string)
|
44 | 45 | - [`useTLS (bool)`](#usetls-bool)
|
@@ -134,7 +135,6 @@ try {
|
134 | 135 | onDecryptionFailure,
|
135 | 136 | onMemberAdded,
|
136 | 137 | onMemberRemoved,
|
137 |
| - // onAuthorizer, |
138 | 138 | });
|
139 | 139 |
|
140 | 140 | await pusher.subscribe({ channelName });
|
@@ -172,39 +172,6 @@ If no messages are received after this time period (in seconds), the ping messa
|
172 | 172 |
|
173 | 173 | You can get your `API_KEY` and `API_CLUSTER` from the [Pusher Channels dashboard](https://dashboard.pusher.com/).
|
174 | 174 |
|
175 |
| -#### `authParams (Map)` |
176 |
| - |
177 |
| -Allows passing additional data to authorizers. Supports query string params and headers (AJAX only). For example, the following will pass `foo=bar` via the query string and `baz: boo` via headers: |
178 |
| - |
179 |
| -```typescript |
180 |
| -const pusher = Pusher.getInstance(); |
181 |
| -await pusher.init( |
182 |
| - apiKey: API_KEY, |
183 |
| - cluster: API_CLUSTER, |
184 |
| - authParams: { |
185 |
| - params: { foo: 'bar' }, |
186 |
| - headers: { baz: 'boo' } |
187 |
| - } |
188 |
| -}); |
189 |
| -``` |
190 |
| - |
191 |
| -Additional parameters are to be sent when the channel authentication endpoint is called. When using [ajax authentication](https://pusher.com/docs/authenticating_users#ajax_authentication) the parameters are passed as additional `POST` parameters. When using [jsonp authentication](http://pusher.com/docs/authenticating_users#jsonp_authentication) the parameters are passed as `GET` parameters. This can be useful with web application frameworks that guard against [CSRF (Cross-site request forgery)](http://en.wikipedia.org/wiki/Cross-site_request_forgery). |
192 |
| - |
193 |
| -CSRF |
194 |
| - |
195 |
| -If you require a CSRF header for incoming requests to the private channel authentication endpoint on your server, you should add a CSRF token to the `auth` hash under `headers`. This applies to frameworks which use CSRF protection by default. |
196 |
| - |
197 |
| -```typescript |
198 |
| -const pusher = await pusher.init( |
199 |
| - apiKey: API_KEY, |
200 |
| - cluster: API_CLUSTER, |
201 |
| - authParams: { |
202 |
| - params: { foo: 'bar' }, |
203 |
| - headers: { 'X-CSRF-Token': 'SOME_CSRF_TOKEN' } |
204 |
| - } |
205 |
| -); |
206 |
| -``` |
207 |
| - |
208 | 175 | #### `authEndpoint (string)`
|
209 | 176 |
|
210 | 177 | The authEndpoint provides a URL that the
|
|
0 commit comments