Sign API for apeman
Last updated 2 years ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install apeman-api-sign 
SYNC missed versions from official npm registry.


Build Status Code Climate Code Coverage npm Version JS Standard

Sign API for apeman


$ npm install apeman-api-sign --save


Define a module in Apemanfile and run the server.

/** Example of Apemanfile.js */

'use strict'

const co = require('co')

let { NODE_ENV } = process.env

module.exports = {
  $cwd: __dirname,
  $pkg: { /* ... */ },
  $proto: [ /* ... */ ],
  $api: {
    // Define APIs
    'sign': require('apeman-api-sign')(
      User, UserSign,
        logging: NODE_ENV === 'development'

Then, call the module from client script

#!/usr/bin/env node

 * Example client
'use strict'

const co = require('co')
const apemanApiClient = require('apeman-api-client')

co(function * () {
  // Setup an client
  let api = yield apemanApiClient('/api')

  // Connect to a module
  let sign = yield api.connect('sign')
  let pong = yield sign.ping()
  /* ... */

  yield sign.signup('hoge', 'hoge@example.com', '!Jasdp08u')


The following methods are provided by the API.


Test the reachability of the api.

Param Type Description
pong string Pong message to return

.signup(key, email, password, options)

Param Type Description
key string User key to signup
email string User email to signup
password string User password to signup
options Object Optional settings

.signin(key, password)

Do sign in

Param Type Description
key string User key or email to signup
password string User password


Get signing data

.signmod(keys, password)

Modify sign data

Param Type Description
keys object Sign keys to update
password string Password to update


Do signout


Delete sign data


Check password is valid

Param Type Description
password string


This software is released under the MIT License.


Maintainers (1)
Today 0
This Week 0
This Month 29
Last Day 0
Last Week 0
Last Month 55
Dependencies (7)
Dev Dependencies (21)
Dependents (2)

Copyright 2014 - 2017 © taobao.org |