1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-21 07:29:37 +01:00

Merge branch '4.x' into feat-new-detail-page

This commit is contained in:
Juan Picado @jotadeveloper 2019-02-13 20:59:23 +01:00 committed by GitHub
commit 16b1eb92cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -223,6 +223,14 @@ class Auth implements IAuth {
}
apiJWTmiddleware() {
const plugins = this.plugins.slice(0);
const helpers = { createAnonymousRemoteUser, createRemoteUser };
for (const plugin of plugins) {
if (plugin.apiJWTmiddleware) {
return plugin.apiJWTmiddleware(helpers);
}
}
return (req: $RequestExtend, res: $Response, _next: NextFunction) => {
req.pause();