Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
chore(plugins/query-string-auth): tidy jsdoc types
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Oct 29, 2023
1 parent 8279f50 commit b622ce9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/plugins/query-string-auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@

const fp = require("fastify-plugin");

/**
* @typedef {object} ApiKey
* @property {string} clientName - Name of client or service associated with API key.
* @property {string} value - API key value.
*/

/**
* @author Frazer Smith
* @description On-Request plugin that checks request query string API key param is in allowed list.
* @param {import("fastify").FastifyInstance} server - Fastify instance.
* @param {object} options - Plugin config values.
* @param {object[]|Set<object>} options.apiKeys - Array or Set of objects containing allowing API keys.
* @param {string} options.apiKeys[].clientName - Name of client or service associated with API key.
* @param {string} options.apiKeys[].value - API key value.
* @param {ApiKey[]|Set<ApiKey>} options.apiKeys - Array or Set of objects containing allowed API keys.
* @param {boolean} [options.removeParam] - Remove API key param from query string after it has been checked.
* This stops the API key being exposed to the redirect URL.
* Defaults to `true`.
Expand Down

0 comments on commit b622ce9

Please sign in to comment.