Closed BenMansley closed 5 years ago
Merging #304 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #304 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 2 2
Lines 106 106
=====================================
Hits 106 106
Impacted Files | Coverage Δ | |
---|---|---|
lib/index.js | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 1f96cd7...37ba54d. Read the comment docs.
Issue: #303
Motivation:
Our usage of
hapi-auth-jwt2
includes a validate function with multiple invalid cases (the user is deleted, the user is using an old token etc). We'd like to distinguish between these cases when an error is raised, so we need a custom error, rather than justInvalid credentials
for all cases.In this PR:
errorMessage
property to the object returned from thevalidate
function, defaulting toInvalid credentials
.