def-login-client
The DEF SDK Login Client
Last updated 5 months ago by tbfed .
ISC · Original npm · Tarball
$ cnpm install def-login-client 
SYNC missed versions from official npm registry.

'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));
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (8)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2017 © taobao.org |