Skip to content

Commit 592954f

Browse files
committed
add docs
1 parent 2adec15 commit 592954f

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"boom": "^6.0.0",
5151
"joi": "^13.0.0",
5252
"jsonwebtoken": "^8.1.0",
53-
"keycloak-auth-utils": "^3.3.0-cr.2",
53+
"keycloak-auth-utils": "^3.3.0",
5454
"lodash": "^4.17.4"
5555
},
5656
"peerDependencies": {

src/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async function verifySignedJwt (tkn) {
4545
* @param {string} tkn The token to be validated
4646
* @returns {Promise} The error-handled promise
4747
*
48-
* @throws {Error} If token is invalid
48+
* @throws {Error} If token is invalid or request fails
4949
*/
5050
async function introspect (tkn) {
5151
try {
@@ -108,6 +108,8 @@ function getValidateFn () {
108108
*
109109
* @param {string} tkn The token to be validated
110110
* @param {Function} h The toolkit
111+
*
112+
* @throws {Boom.unauthorized} If validation fails
111113
*/
112114
async function handleKeycloakValidation (tkn, h) {
113115
try {
@@ -132,6 +134,8 @@ async function handleKeycloakValidation (tkn, h) {
132134
*
133135
* @param {string} field The authorization field, e.g. the value of `Authorization`
134136
* @param {Object} h The reply toolkit
137+
*
138+
* @throws {Boom.unauthorized} If header is missing or has an invalid format
135139
*/
136140
async function validate (field, h = (data) => data) {
137141
const tkn = token.create(field)

0 commit comments

Comments
 (0)