MCPcopy
hub / github.com/dwyl/learn-json-web-tokens / verify

Function verify

example/lib/helpers.js:96–104  ·  view source on GitHub ↗
(token)

Source from the content-addressed store, hash-verified

94}
95
96function verify(token) {
97 var decoded = false;
98 try {
99 decoded = jwt.verify(token, secret);
100 } catch (e) {
101 decoded = false; // still false
102 }
103 return decoded;
104}
105
106// can't use the word private as its an ES "future" reserved word!
107// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords

Callers 2

validateFunction · 0.85
logoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected