apiKey method

Future<String> apiKey({
  1. String header = 'x-api-key',
  2. String query = 'api_key',
  3. bool allowQuery = true,
})

An API key from a header, falling back to the query string.

Implementation

Future<String> apiKey({
  String header = 'x-api-key',
  String query = 'api_key',
  bool allowQuery = true,
}) =>
    extractors
        .apiKey(header: header, query: query, allowQuery: allowQuery)
        .require(this);