Skip to content

Latest commit

 

History

History
194 lines (112 loc) · 5.44 KB

api.md

File metadata and controls

194 lines (112 loc) · 5.44 KB

the-controller-sign@1.1.6

Sign controller for the-server

Functions

create(args) -> TheSignCtrl

Create a TheSignCtrl instance

Param Type Description
args *

mixSignCheck(BaseClass, options) -> function

Mix up controller class with sign check feature

Param Type Description
BaseClass function
options Object Optional settings
options.only Array.<string> Action names to apply.

TheSignCtrl Class

Sign controller for the-server

Extends:

  • TheCtrl

new TheSignCtrl()

Constructor of TheSignCtrl class

ctrl.signup(name, password, otherAttributes) -> Promise.<UserEntity>

Sign up

Param Type Description
name string Name to identify user
password string Password
otherAttributes Object Other attributes

ctrl.signin(name, password, options) -> Promise.<UserEntity>

Signin

Param Type Description
name string Name to identify user
password string Password
options Object Optional settings

ctrl.signout() -> Promise.<boolean>

Signout

ctrl.getSigned() -> Promise.<UserEntity>

Get signed

ctrl.syncSigned() -> Promise.<boolean>

Sync signed

ctrl.assertSigned() -> Promise

Assert signed

ctrl.assertPassword(password) -> Promise.<void>

Assert password

Param Type Description
password

ctrl.signup(name, password, otherAttributes) -> Promise.<UserEntity>

Sign up

Param Type Description
name string Name to identify user
password string Password
otherAttributes Object Other attributes

ctrl.signin(name, password, options) -> Promise.<UserEntity>

Signin

Param Type Description
name string Name to identify user
password string Password
options Object Optional settings

ctrl.signout() -> Promise.<boolean>

Signout

ctrl.getSigned() -> Promise.<UserEntity>

Get signed

ctrl.syncSigned() -> Promise.<boolean>

Sync signed

ctrl.assertSigned() -> Promise

Assert signed

ctrl.assertPassword(password) -> Promise.<void>

Assert password

Param Type Description
password