MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / verify

Method verify

lib/services/token-service.mjs:18–29  ·  view source on GitHub ↗
(domain, token)

Source from the content-addressed store, hash-verified

16 }
17
18 verify (domain, token) {
19 const now = new Date()
20 if (!this.tokens[domain]) {
21 throw new Error(`Invalid domain for tokens: ${domain}`)
22 }
23 const tokenValue = this.tokens[domain][token]
24 if (tokenValue && now < tokenValue.exp) {
25 return tokenValue
26 } else {
27 return false
28 }
29 }
30
31 remove (domain, token) {
32 if (!this.tokens[domain]) {

Callers 6

handlerFunction · 0.80
validateDeleteTokenMethod · 0.80
validateResetTokenMethod · 0.80
verifyWebIdMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected