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:
commit
16b1eb92cf
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user