Skip to content

Commit e7b86bb

Browse files
authored
Merge pull request #15 from pusher/prepare-example-app
Prepare Example app to go public
2 parents ffecbea + 520a5d2 commit e7b86bb

File tree

6 files changed

+5046
-56
lines changed

6 files changed

+5046
-56
lines changed

README.md

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Pusher React Native Websocket Client
2+
23
[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](http://twitter.com/Pusher)
34
[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/pusher/pusher-websocket-react-native/master/LICENSE)
45
[![npm version](https://badge.fury.io/js/@pusher%2Fpusher-websocket-react-native.svg)](https://badge.fury.io/js/@pusher%2Fpusher-websocket-react-native)
@@ -38,7 +39,6 @@ a minimal application to connect to a channel and send events.
3839
- [Configuration](#configuration)
3940
- [`activityTimeout (double)`](#activitytimeout-double)
4041
- [`apiKey (string)`](#apikey-string)
41-
- [`authParams (Map)`](#authparams-map)
4242
- [`authEndpoint (string)`](#authendpoint-string)
4343
- [`cluster (string)`](#cluster-string)
4444
- [`useTLS (bool)`](#usetls-bool)
@@ -134,7 +134,6 @@ try {
134134
onDecryptionFailure,
135135
onMemberAdded,
136136
onMemberRemoved,
137-
// onAuthorizer,
138137
});
139138

140139
await pusher.subscribe({ channelName });
@@ -172,39 +171,6 @@ If no messages are received after this time period (in seconds), the ping messa
172171

173172
You can get your `API_KEY` and `API_CLUSTER` from the [Pusher Channels dashboard](https://dashboard.pusher.com/).
174173

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-
208174
#### `authEndpoint (string)`
209175

210176
The authEndpoint provides a URL that the

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,5 +124,5 @@ dependencies {
124124
// noinspection GradleDynamicVersion
125125
api 'com.facebook.react:react-native:+'
126126
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
127-
api 'com.pusher:pusher-java-client:+'
127+
api 'com.pusher:pusher-java-client:2.2.8'
128128
}

0 commit comments

Comments
 (0)