(domain, token)
| 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]) { |
no outgoing calls
no test coverage detected