Skip to content

Commit

Permalink
Fixing bearer token auth lookup such that changes in time are reflect…
Browse files Browse the repository at this point in the history
…ed here
  • Loading branch information
avoidwork committed Feb 28, 2019
1 parent 80bac0c commit d6c2568
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,8 @@ function auth (obj, config) {

if (config.auth.bearer.enabled) {
(function () {
let x = config.auth.bearer.tokens || [];

function validate (arg, cb) {
if (x.includes(arg)) {
if (obj.config.auth.bearer.tokens.includes(arg)) {
cb(null, arg);
} else {
cb(new Error(STATUS_CODES[401]), null);
Expand Down

0 comments on commit d6c2568

Please sign in to comment.