UNPKG

@strongnguyen/oidc-provider

Version:

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

15 lines (12 loc) 349 B
const { RegistrationNotSupported } = require('../../helpers/errors'); /* * Rejects registration parameter as not supported. * * @throws: registration_not_supported */ module.exports = function rejectRegistration(ctx, next) { if (ctx.oidc.params.registration !== undefined) { throw new RegistrationNotSupported(); } return next(); };