You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
555 B
24 lines
555 B
'use strict';
|
|
|
|
var keyfetch = require('./keyfetch.js');
|
|
var testIss = "https://example.auth0.com";
|
|
|
|
keyfetch.init({});
|
|
keyfetch.oidcJwks(testIss).then(function (hits) {
|
|
keyfetch._clear();
|
|
console.log(hits);
|
|
return keyfetch.oidcJwk(hits[0].thumbprint, testIss).then(function () {
|
|
return keyfetch.oidcJwk(hits[0].thumbprint, testIss).then(function (jwk) {
|
|
console.log(jwk);
|
|
});
|
|
});
|
|
}).catch(function (err) {
|
|
console.error(err);
|
|
});
|
|
|
|
/*
|
|
var jwt = '...';
|
|
keyfetch.verify({ jwt: jwt }).catch(function (err) {
|
|
console.log(err);
|
|
});
|
|
*/
|
|
|