<api port="2000">
<openapi location="fruitshop-api-v2-openapi-3-security.yml" validateSecurity="yes"/>
<apiKey required = "false">
<headerExtractor name="X-Api-Key"/>
</apiKey>
<!--Swagger UI requires CORS but FruitShop does not use CORS, so we disable CORS.-->
<headerFilter>
<exclude>Origin</exclude>
</headerFilter>
</api>
Name | Required | Default | Description | Example |
---|---|---|---|---|
required | false | true |
Controls whether API key validation is enforced or optional. Optional will still load scopes and make them available for checking through SpEL function "hasScope()". | false |
Elements | Description | Cardinality |
---|---|---|
mongoDBApiKeyStore | API key stores to validate keys against | 0..* |
keys | API key stores to validate keys against | 0..* |
apiKeyFileStore | API key stores to validate keys against | 0..* |
databaseApiKeyStore | API key stores to validate keys against | 0..* |
expressionExtractor | Extractors that define where and how to extract API keys from requests Default: <headerExtractor /> (Using default header "X-Api-Key") | 0..* |
headerExtractor | Extractors that define where and how to extract API keys from requests Default: <headerExtractor /> (Using default header "X-Api-Key") | 0..* |
queryParamExtractor | Extractors that define where and how to extract API keys from requests Default: <headerExtractor /> (Using default header "X-Api-Key") | 0..* |