<commit_before>_               = require 'lodash'
MeshbluConfig   = require 'meshblu-config'
PassportOctoblu = require 'passport-octoblu'

class OctobluStrategy extends PassportOctoblu
  constructor: (env) ->
    throw new Error('Missing required environment variable: MESHBLU_UUID')  if _.isEmpty process.env.MESHBLU_UUID
    throw new Error('Missing required environment variable: MESHBLU_TOKEN') if _.isEmpty process.env.MESHBLU_TOKEN
    throw new Error('Missing required environment variable: ENDO_<%= constantPrefix %>_OCTOBLU_OAUTH_URL')     if _.isEmpty process.env.ENDO_<%= constantPrefix %>_OCTOBLU_OAUTH_URL

    options = {
      clientID:         process.env.ENDO_<%= constantPrefix %>_OCTOBLU_CLIENT_ID
      clientSecret:     process.env.ENDO_<%= constantPrefix %>_OCTOBLU_CLIENT_SECRET
      authorizationURL: "#{process.env.ENDO_<%= constantPrefix %>_OCTOBLU_OAUTH_URL}/authorize"
      tokenURL:         "#{process.env.ENDO_<%= constantPrefix %>_OCTOBLU_OAUTH_URL}/access_token"
      meshbluConfig:    new MeshbluConfig().toJSON()
    }

    super options, (bearerToken, secret, {uuid}, next) =>
      next null, {uuid, bearerToken}

module.exports = OctobluStrategy<commit_msg>removed env variables for CLIENT_ID and secret. Just use the MESHBLU_UUID/TOKEN!<commit_after>_               = require 'lodash'
MeshbluConfig   = require 'meshblu-config'
PassportOctoblu = require 'passport-octoblu'

class OctobluStrategy extends PassportOctoblu
  constructor: (env) ->
    throw new Error('Missing required environment variable: MESHBLU_UUID')  if _.isEmpty process.env.MESHBLU_UUID
    throw new Error('Missing required environment variable: MESHBLU_TOKEN') if _.isEmpty process.env.MESHBLU_TOKEN
    throw new Error('Missing required environment variable: ENDO_<%= constantPrefix %>_OCTOBLU_OAUTH_URL')     if _.isEmpty process.env.ENDO_<%= constantPrefix %>_OCTOBLU_OAUTH_URL

    options = {
      clientID:         process.env.MESHBLU_UUID
      clientSecret:     process.env.MESHBLU_TOKEN
      authorizationURL: "#{process.env.ENDO_<%= constantPrefix %>_OCTOBLU_OAUTH_URL}/authorize"
      tokenURL:         "#{process.env.ENDO_<%= constantPrefix %>_OCTOBLU_OAUTH_URL}/access_token"
      meshbluConfig:    new MeshbluConfig().toJSON()
    }

    super options, (bearerToken, secret, {uuid}, next) =>
      next null, {uuid, bearerToken}

module.exports = OctobluStrategy
{'fraction_non_alphanumeric': 0.09899749373433583, 'fraction_numerical': 0.0, 'mean_word_length': 4.263736263736264, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, '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': '5895869', 'n_tokens_mistral': 797, 'n_tokens_neox': 771, 'n_words': 167}