yz-module-user

1.0.17 • Public • Published

options

  • server: 服务地址,
  • loginLevel: 登陆级别,
  • port: Port 各系统端口,
  • path: 第三方登陆重定向地址path
  • systemKey
  • systemSecret
  • resultPropertyKey: axios 返回数据取哪个字段
  • axios: 系统axios
  • encryMode: 密码加密方式 userModule.encryMode = { none: 0, md5: 1, rsa: 2 }
  • publicKey: rsa 加密的publicKey

methods

  • configure: (option) => userModule 配置userModule
  • login: (account, pwd) => Promise(result) 登陆
  • loginOut: () => null 注销
  • otherLogin: (type) => null 第三方登陆
  • getAccessToken: () => result 获取访问令牌
  • checkCode: () => Promise(Boolean) 检查第三方登陆
  • getUserInfo: () => Promise(userInfo) 获取用户信息
  • encryPassword: (password: String) => password: String 使用配置的加密方式加密密码
  • authentication: (account: String, Password: String) 验证账号密码是否正确
  • updatePassword: (oriPassword: String, Password: String, confirmPassword: String) 修改密码

Port

  • system: 系统端口
  • api: api 端口
  • login: 登陆中心端口

result

{
  ok: Boolean,
  data: Obj,
  err: {
    msg: String
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i yz-module-user

Weekly Downloads

0

Version

1.0.17

License

ISC

Unpacked Size

75 kB

Total Files

7

Last publish

Collaborators

  • nocatch