3. Security and Validation

apiKeyFileStore

Loads API keys and optional scopes from a text file. Each non-empty line must contain a key.

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

Can be used in:

apiKey and bean

Attributes

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