def-login-ide-client
v1.0.2
Published
The DEF SDK Login Client
Downloads
3
Readme
'use strict';
const Client = require('def-login-client');
const c = new Client({
'server': 'http://def.taobao.com',
});
require('co')(function* () {
console.log('login');
const token = yield c.login();
console.log('token', token);
const user = yield c.user();
console.log('user', user);
const ticket = yield c.ticket({'app': 'def'});
console.log('ticket', ticket);
console.log('logout');
yield c.logout();
}).catch(e => console.error(e.stack));