Files
shields/services/github/auth/is-valid-token.js
Paul Melnikow 8af48c0a21 Minor tweaks in [github] auth code (#1862)
* Move / rework is-valid-token

* TokenPool: Add allValidTokenIds method

* Minor cleanup in server.js
2018-08-09 07:22:54 -04:00

9 lines
192 B
JavaScript

'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