3. Security and Validation

apiKeyFileStore

Version

Loads API keys and optional scopes from a text file. Each non-empty line must contain a key.
  • Blank lines are ignored.
  • A hash sign (#) starts a comment (line or end-of-line).
  • Scopes can follow the key, separated by a colon. Multiple scopes are comma-separated.

Example file:

 # demo API keys
 123456                 # key without scopes
 7890:read,write        # key with two scopes

 # another valid key
 abcd:admin
 

Example:

See: GitHub example file

Attributes

NameRequiredDefaultDescriptionExamples
locationfalse-Path or URL to the API key file. Can point to local files or classpath resources.classpath:demo-keys.txt

Can be used in