UNPKG

@strongnguyen/oidc-provider

Version:

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

14 lines (11 loc) 349 B
const presence = require('../../helpers/validate_presence'); /* * Validates presence of mandatory OAuth2.0 parameters response_type, client_id and scope. * * @throws: invalid_request */ module.exports = function oauthRequired(ctx, next) { // Validate: required oauth params presence(ctx, 'response_type', 'client_id'); return next(); };