Skip to content

Commit 3ceec21

Browse files
author
Devendra
committed
add auth key to params for CG methods
1 parent 442371f commit 3ceec21

File tree

20 files changed

+220
-168
lines changed

20 files changed

+220
-168
lines changed

core/pubnub-common.js

+4
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,10 @@ function PN_API(setup) {
468468
, err = args['error'] || error
469469
, jsonp = jsonp_cb();
470470

471+
if (!data['auth']) {
472+
data['auth'] = args['auth_key'] || AUTH_KEY;
473+
}
474+
471475
var url = [
472476
STD_ORIGIN, 'v1', 'channel-registration',
473477
'sub-key', SUBSCRIBE_KEY

modern/pubnub.js

+4
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,10 @@ function PN_API(setup) {
469469
, err = args['error'] || error
470470
, jsonp = jsonp_cb();
471471

472+
if (!data['auth']) {
473+
data['auth'] = args['auth_key'] || AUTH_KEY;
474+
}
475+
472476
var url = [
473477
STD_ORIGIN, 'v1', 'channel-registration',
474478
'sub-key', SUBSCRIBE_KEY

modern/pubnub.min.js

+24-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node.js/pubnub.js

+4
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,10 @@ function PN_API(setup) {
469469
, err = args['error'] || error
470470
, jsonp = jsonp_cb();
471471

472+
if (!data['auth']) {
473+
data['auth'] = args['auth_key'] || AUTH_KEY;
474+
}
475+
472476
var url = [
473477
STD_ORIGIN, 'v1', 'channel-registration',
474478
'sub-key', SUBSCRIBE_KEY

phonegap/pubnub.js

+4
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,10 @@ function PN_API(setup) {
469469
, err = args['error'] || error
470470
, jsonp = jsonp_cb();
471471

472+
if (!data['auth']) {
473+
data['auth'] = args['auth_key'] || AUTH_KEY;
474+
}
475+
472476
var url = [
473477
STD_ORIGIN, 'v1', 'channel-registration',
474478
'sub-key', SUBSCRIBE_KEY

phonegap/pubnub.min.js

+24-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sencha/pubnub.js

+4
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,10 @@ function PN_API(setup) {
469469
, err = args['error'] || error
470470
, jsonp = jsonp_cb();
471471

472+
if (!data['auth']) {
473+
data['auth'] = args['auth_key'] || AUTH_KEY;
474+
}
475+
472476
var url = [
473477
STD_ORIGIN, 'v1', 'channel-registration',
474478
'sub-key', SUBSCRIBE_KEY

sencha/pubnub.min.js

+24-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

smart-tv/pubnub.js

+4
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,10 @@ function PN_API(setup) {
619619
, err = args['error'] || error
620620
, jsonp = jsonp_cb();
621621

622+
if (!data['auth']) {
623+
data['auth'] = args['auth_key'] || AUTH_KEY;
624+
}
625+
622626
var url = [
623627
STD_ORIGIN, 'v1', 'channel-registration',
624628
'sub-key', SUBSCRIBE_KEY

smart-tv/pubnub.min.js

+24-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

socket.io/socket.io.min.js

+24-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

titanium/examples/desktop/pubnub.js

+4
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,10 @@ function PN_API(setup) {
470470
, err = args['error'] || error
471471
, jsonp = jsonp_cb();
472472

473+
if (!data['auth']) {
474+
data['auth'] = args['auth_key'] || AUTH_KEY;
475+
}
476+
473477
var url = [
474478
STD_ORIGIN, 'v1', 'channel-registration',
475479
'sub-key', SUBSCRIBE_KEY

titanium/examples/mobile/chat-example-app/Resources/pubnub.js

+4
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,10 @@ function PN_API(setup) {
470470
, err = args['error'] || error
471471
, jsonp = jsonp_cb();
472472

473+
if (!data['auth']) {
474+
data['auth'] = args['auth_key'] || AUTH_KEY;
475+
}
476+
473477
var url = [
474478
STD_ORIGIN, 'v1', 'channel-registration',
475479
'sub-key', SUBSCRIBE_KEY

titanium/examples/mobile/detailed-history-example-app/Resources/pubnub.js

+4
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,10 @@ function PN_API(setup) {
470470
, err = args['error'] || error
471471
, jsonp = jsonp_cb();
472472

473+
if (!data['auth']) {
474+
data['auth'] = args['auth_key'] || AUTH_KEY;
475+
}
476+
473477
var url = [
474478
STD_ORIGIN, 'v1', 'channel-registration',
475479
'sub-key', SUBSCRIBE_KEY

titanium/examples/mobile/here-now-example-app/Resources/pubnub.js

+4
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,10 @@ function PN_API(setup) {
470470
, err = args['error'] || error
471471
, jsonp = jsonp_cb();
472472

473+
if (!data['auth']) {
474+
data['auth'] = args['auth_key'] || AUTH_KEY;
475+
}
476+
473477
var url = [
474478
STD_ORIGIN, 'v1', 'channel-registration',
475479
'sub-key', SUBSCRIBE_KEY

titanium/pubnub.js

+4
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,10 @@ function PN_API(setup) {
470470
, err = args['error'] || error
471471
, jsonp = jsonp_cb();
472472

473+
if (!data['auth']) {
474+
data['auth'] = args['auth_key'] || AUTH_KEY;
475+
}
476+
473477
var url = [
474478
STD_ORIGIN, 'v1', 'channel-registration',
475479
'sub-key', SUBSCRIBE_KEY

web/pubnub.js

+4
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,10 @@ function PN_API(setup) {
619619
, err = args['error'] || error
620620
, jsonp = jsonp_cb();
621621

622+
if (!data['auth']) {
623+
data['auth'] = args['auth_key'] || AUTH_KEY;
624+
}
625+
622626
var url = [
623627
STD_ORIGIN, 'v1', 'channel-registration',
624628
'sub-key', SUBSCRIBE_KEY

0 commit comments

Comments
 (0)