UNPKG

strapi-plugin-users-permissions

Version:

Protect your API with a full-authentication process based on JWT

10 lines (7 loc) 135 B
'use strict'; module.exports = async (ctx, next) => { if (!ctx.state.user) { return ctx.unauthorized(); } await next(); };