Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions lib/jwt/AccessToken.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,22 +100,6 @@ declare namespace AccessToken {
pushCredentialSid?: string;
}

export interface ConversationsGrantOptions {
configurationProfileSid?: string;
}

export interface ConversationsGrantPayload {
configuration_profile_sid?: string;
}

export class ConversationsGrant extends Grant<
ConversationsGrantOptions,
ConversationsGrantPayload,
'rtc'
> implements ConversationsGrant {
configurationProfileSid?: string;
}

export interface VideoGrantOptions {
room?: string;
}
Expand Down
25 changes: 0 additions & 25 deletions lib/jwt/AccessToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,30 +88,6 @@ IpMessagingGrant.prototype = _.create(ChatGrant.prototype, _.assign({

IpMessagingGrant.prototype.key = 'ip_messaging';

/**
* @deprecated - Use VideoGrant instead
*
* @constructor
* @param {object} options - ...
* @param {string} options.configurationProfileSid - The configuration
* profile unique ID
*/
function ConversationsGrant(options) {
options = options || {};
this.configurationProfileSid = options.configurationProfileSid;
}

_.extend(ConversationsGrant.prototype, {
key: 'rtc',
toPayload: function() {
var grant = {};
if (this.configurationProfileSid) {
grant.configuration_profile_sid = this.configurationProfileSid;
}
return grant;
}
});

/**
* @constructor
* @param {object} options - ...
Expand Down Expand Up @@ -251,7 +227,6 @@ AccessToken.ChatGrant = ChatGrant;
AccessToken.VoiceGrant = VoiceGrant;
AccessToken.SyncGrant = SyncGrant;
AccessToken.VideoGrant = VideoGrant;
AccessToken.ConversationsGrant = util.deprecate(ConversationsGrant, 'ConversationsGrant is deprecated, use VideoGrant instead.');
AccessToken.TaskRouterGrant = TaskRouterGrant;
AccessToken.PlaybackGrant = PlaybackGrant;
AccessToken.DEFAULT_ALGORITHM = 'HS256';
Expand Down
17 changes: 0 additions & 17 deletions spec/unit/jwt/AccessToken.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,23 +199,6 @@ describe('AccessToken', function() {
});
});

it('should create token with conversations grant', function() {
var token = new twilio.jwt.AccessToken(accountSid, keySid, 'secret');
token.identity = 'ID@example.com';

var grant = new twilio.jwt.AccessToken.ConversationsGrant();
grant.configurationProfileSid = 'VSxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
token.addGrant(grant);

var decoded = jwt.verify(token.toJwt(), 'secret');
expect(decoded.grants).toEqual({
identity: 'ID@example.com',
rtc: {
configuration_profile_sid: 'VSxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
}
});
});

it('should create token with sync grant', function() {
var token = new twilio.jwt.AccessToken(accountSid, keySid, 'secret');
token.identity = 'ID@example.com';
Expand Down