<commit_before>'use strict'

const express = require('express')
const bodyParser = require('body-parser')

function api (provider) {
  const router = express.Router('/')

  router.use(bodyParser.json())
  router.use(bodyParser.urlencoded({ extended: false }))

  let {discover, jwks, register, authorize, token, userinfo} = provider

  router.get('/.well-known/openid-configuration', discover.bind(provider))
  router.get('/jwks', jwks.bind(provider))
  router.post('/register', register.bind(provider))
  router.get('/authorize', authorize.bind(provider))
  router.post('/authorize', authorize.bind(provider))
  router.post('/token', token.bind(provider))
  router.get('/userinfo', userinfo.bind(provider))

  return router
}

module.exports = api<commit_msg>feat(logout): Add binding for /logout api<commit_after>'use strict'

const express = require('express')
const bodyParser = require('body-parser')

function api (provider) {
  const router = express.Router('/')

  router.use(bodyParser.json())
  router.use(bodyParser.urlencoded({ extended: false }))

  let {discover, jwks, register, authorize, token, userinfo, logout } = provider

  router.get('/.well-known/openid-configuration', discover.bind(provider))
  router.get('/jwks', jwks.bind(provider))
  router.post('/register', register.bind(provider))
  router.get('/authorize', authorize.bind(provider))
  router.post('/authorize', authorize.bind(provider))
  router.post('/token', token.bind(provider))
  router.get('/userinfo', userinfo.bind(provider))
  router.get('/logout', logout.bind(provider))

  return router
}

module.exports = api
{'fraction_non_alphanumeric': 0.16645885286783044, 'fraction_numerical': 0.0, 'mean_word_length': 5.524390243902439, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1817918', 'n_tokens_mistral': 497, 'n_tokens_neox': 482, 'n_words': 95}