Gathering detailed insights and metrics for moh-auth-plus
Gathering detailed insights and metrics for moh-auth-plus
Gathering detailed insights and metrics for moh-auth-plus
Gathering detailed insights and metrics for moh-auth-plus
The auth plus lib to make auth with role, oauth, custome auth easily and reuseable.
npm install moh-auth-plus
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
10 Commits
2 Branches
1 Contributors
Updated on Feb 16, 2018
Latest Version
1.0.0
Package Id
moh-auth-plus@1.0.0
Unpacked Size
17.19 kB
Size
4.76 kB
File Count
11
NPM Version
5.6.0
Node Version
8.9.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
5
The auth plus lib to make auth with role, oauth, custome auth easily and reuseable.
User should inject the following methhod to make functions works.
AuthPlus
with your own bussiness logic1authPlus = AuthPlus({ 2 tokenTTL: xxx, 3 basicAuth: (username, password) => {}, 4 customLogin: (openId) => {}, 5 fetchInfo: (user) => {}, 6 createToken: (user, info) => {}, 7 authByToken: (token) => {}, 8 refreshToken: (refreshToken) => {}, 9 revokeToken: (token) => {}, 10 customRevokeToken: (username) => {} 11})
const token = await authPlus.basicLogin('ole3021', 'test1234')
const token = await authPlus.customLogin('WeChatOpenId')
const token = await authPlus.authenticate(currentToken.accessToken)
const token = await authPlus.refreshToken('refreshToken')
const result = await authPlus.logout(currentToken.accessToken)
const result = await authPlus.forceLogout('ole3022')
A1 basicAuth: return valied user with account
and password
info. (account, password) => Promise.resolve(user)
A2 customAuth: return valied user with customInfo
. (customInfo) => Promise.resolve(user)
B fetchInfo: return other related info with user
. *(user) => Promise.resolve(info)
C createdToken: return token with user
and info
. (user, *info) => token
D authByToken: return toekn
withh accessToken
. (accessToken) => token
E refreshhToken: return new token
with refreshToken
. (refreshToken) => token
F1 revokeToken: return boolean with accessToken
. (accessToken) => boolean
F2 customRevokeToken: return boolean with userId
. (info) => boolean
(Use for scenario like admin cancel user access righ.)
encrypt: return encrypted password. (password, *salt) => encryptedPassword
isVerified: return is password matchh the encrypted password. (password, encryptedPassword) => boolean
A1 -> *B -> C
A2 -> *B -> C
D
E
F1
F2
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/4 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
68 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More