(username, password, cb)
| 113 | |
| 114 | //Same but asynchronous |
| 115 | function myAsyncAuthorizer(username, password, cb) { |
| 116 | if(username.startsWith('A') && password.startsWith('secret')) |
| 117 | return cb(null, true) |
| 118 | else |
| 119 | return cb(null, false) |
| 120 | } |
| 121 | |
| 122 | function myComparingAuthorizer(username, password) { |
| 123 | return basicAuth.safeCompare(username, 'Testeroni') & basicAuth.safeCompare(password, 'testsecret') |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…