UNPKG

oidc-provider

Version:

OAuth 2.0 Authorization Server implementation for Node.js with OpenID Connect

10 lines (8 loc) 215 B
import bodyParser from './selective_body.js'; export default async function parseBodyIfPost(cty, ctx, next) { if (ctx.method === 'POST') { await bodyParser(cty, ctx, next); } else { await next(); } }