Minor tweaks in [github] auth code (#1862)

* Move / rework is-valid-token

* TokenPool: Add allValidTokenIds method

* Minor cleanup in server.js
This commit is contained in:
Paul Melnikow
2018-08-09 07:22:54 -04:00
committed by GitHub
parent c11d97a192
commit 8af48c0a21
6 changed files with 13 additions and 9 deletions

View File

@@ -0,0 +1,8 @@
'use strict'
// This is only used by the TokenProviders, though probably the acceptor
// should use it too.
const isValidToken = t => /^[0-9a-f]{40}$/.test(t)
module.exports = isValidToken