* Retrieves challenge data from storage * @private * @param {string} token - Challenge token * @returns {Promise } Challenge data or null if not found
(token)
| 239 | * @returns {Promise<ChallengeData|null>} Challenge data or null if not found |
| 240 | */ |
| 241 | async _getChallenge(token) { |
| 242 | if (this.config.storage?.challenges?.read) { |
| 243 | return (await this.config.storage.challenges.read(token)) || null; |
| 244 | } |
| 245 | |
| 246 | return this.config.state.challengesList[token] || null; |
| 247 | } |
| 248 | |
| 249 | /** |
| 250 | * Deletes challenge from storage |