mirror of
https://github.com/donl/plivo-node.git
synced 2026-05-25 22:07:10 -06:00
Changes in token creation
This commit is contained in:
parent
29ef3f7c21
commit
15569c769e
1 changed files with 8 additions and 1 deletions
|
|
@ -8,7 +8,14 @@ let client = new Client('sampleid', 'sammpletoken', 'sampleproxy');
|
|||
|
||||
describe('Token', function () {
|
||||
it('should create token via interface', function () {
|
||||
return true;
|
||||
return client.createToken().then(function (response) {
|
||||
assert.equal(response.apiid, '5cbad7b4-19f4-11ed-8b03-0242ac110005');
|
||||
assert.equal(response.token, 'eyJhbGciOiJIUzI1NiIsImN0eSI6InBsaXZvO3Y9MSIsInR5cCI6IkpXVCJ9.eyJhcHAiOiIiLCJleHAiOjE2NjAzNjM2ODMsImlzcyI6Ik1BTURWTFpKWTJaR1k1TVdVMVpKIiwibmJmIjoxNjYwMjc3MjgzLCJwZXIiOnsidm9pY2UiOnsiaW5jb21pbmdfYWxsb3ciOmZhbHNlLCJvdXRnb2luZ19hbGxvdyI6dHJ1ZX19LCJzdWIiOiIifQ.LAwFEuotTmbZeGWBhfNT4X2KbRapYF23BrkwVfmr5A4');
|
||||
}).catch(function (error) {
|
||||
assert.equal(error, 'error');
|
||||
}).done();
|
||||
});
|
||||
});
|
||||
|
||||
// {'api_id': '5cbad7b4-19f4-11ed-8b03-0242ac110005',
|
||||
// 'token': 'eyJhbGciOiJIUzI1NiIsImN0eSI6InBsaXZvO3Y9MSIsInR5cCI6IkpXVCJ9.eyJhcHAiOiIiLCJleHAiOjE2NjAzNjM2ODMsImlzcyI6Ik1BTURWTFpKWTJaR1k1TVdVMVpKIiwibmJmIjoxNjYwMjc3MjgzLCJwZXIiOnsidm9pY2UiOnsiaW5jb21pbmdfYWxsb3ciOmZhbHNlLCJvdXRnb2luZ19hbGxvdyI6dHJ1ZX19LCJzdWIiOiIifQ.LAwFEuotTmbZeGWBhfNT4X2KbRapYF23BrkwVfmr5A4'}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue