
Product
Introducing Module Reachability: Focus on the Vulnerabilities That Matter
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
koa-easemob-api
Advanced tools
Visit easemob api with koa generator function.
使用generator方式访问环信API
npm install koa-easemob-api --save
var easemob = require('koa-easemob-api');
var em = easemob({
app_key: 'solee#gugu',
client_id: 'guess',
client_secret: 'secret',
org_name: 'solee',
app_name: 'gugu',
redis: {
host: '127.0.0.1',
port: 6379,
auth: 'haha1'
}
});
var resp = yield em.registerUser('username', 'password');
resp = yield em.getUser('username');
resp = yield em.deleteUser('username');
resp = yield em.resetPassword('username', 'newpassword');
resp = yield em.modifyNickname('username', 'nickname');
**auth
**为可选输入参数, 根据您的redis-server是否设置密码再填写.
代码会在调用以上方法的时候,使用em.getToken()
方法获取环信的token.
在redis中查看是否已有环信token, 若有则使用该token进行后续服务验证; 若没有则利用输入信息访问环信API获取token并放在redis中.
redis key: easemob:token
ttl: 根据环信返回的过期时间设定
MIT © Bo Li (solee.me)
FAQs
Visit easemob api with koa generator function
The npm package koa-easemob-api receives a total of 8 weekly downloads. As such, koa-easemob-api popularity was classified as not popular.
We found that koa-easemob-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Company News
Socket is bringing best-in-class reachability analysis into the platform — cutting false positives, accelerating triage, and cementing our place as the leader in software supply chain security.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.