UNPKG

@strongnguyen/oidc-provider

Version:

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

14 lines (9 loc) 322 B
const presence = require('../../helpers/validate_presence'); module.exports = function oidcRequired(ctx, next) { const required = new Set(['scope']); if (ctx.oidc.client.backchannelTokenDeliveryMode !== 'poll') { required.add('client_notification_token'); } presence(ctx, ...required); return next(); };