Comparing version 1.0.1 to 1.0.2
@@ -58,3 +58,3 @@ /** | ||
byuJwt.authenticateUAPIMiddleware = function(req, res, next) { | ||
this.authenticate(req.headers) | ||
byuJwt.authenticate(req.headers) | ||
.then(verifiedJWTs => { | ||
@@ -74,12 +74,12 @@ req.verifiedJWTs = verifiedJWTs | ||
byuJwt.decodeJWT = function(jwt) { | ||
return init(this.cache) | ||
.then(openIdConfig => decodeJWT(this.options, openIdConfig, jwt)) | ||
return init(byuJwt.cache) | ||
.then(openIdConfig => decodeJWT(byuJwt.options, openIdConfig, jwt)) | ||
} | ||
byuJwt.getOpenIdConfiguration = function() { | ||
return getOpenIdConfiguration(this.cache) | ||
return getOpenIdConfiguration(byuJwt.cache) | ||
} | ||
byuJwt.getPublicKey = function() { | ||
return init(this.cache) | ||
return init(byuJwt.cache) | ||
.then(getPublicKey) | ||
@@ -89,4 +89,4 @@ } | ||
byuJwt.verifyJWT = function(jwt) { | ||
return init(this.cache) | ||
.then(openIdConfig => verifyJWT(this.options, openIdConfig, jwt)) | ||
return init(byuJwt.cache) | ||
.then(openIdConfig => verifyJWT(byuJwt.options, openIdConfig, jwt)) | ||
.then(() => true) | ||
@@ -99,4 +99,4 @@ .catch(() => false) | ||
cacheTTL: { | ||
get: function() { return this.cache.getTTL() }, | ||
set: function(ttl) { this.cache.setTTL(ttl) } | ||
get: function() { return byuJwt.cache.getTTL() }, | ||
set: function(ttl) { byuJwt.cache.setTTL(ttl) } | ||
} | ||
@@ -103,0 +103,0 @@ |
{ | ||
"name": "byu-jwt", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "The byu-jwt module provides helpful functions to retrieve a specified BYU .well-known URL and verify BYU signed JWTs.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
40903