<?php // $file = /home/bluedoor/www/dev/wp-content/plugins/yooessentials/modules/auth/drivers/ApiKey/driver.json

return [
  'name' => 'api-key', 
  'title' => 'API Key', 
  'description' => 'Key for authenticating API requests.', 
  'icon' => $filter->apply('url', '~yooessentials_url/modules/auth/drivers/ApiKey/icon.svg', $file), 
  'endpoints' => [
    'presave' => 'yooessentials/auth/api-key'
  ], 
  'fields' => [
    'name' => [
      'label' => 'Name', 
      'description' => 'Optional name to identify this key.'
    ], 
    'key' => [
      'label' => 'API Key', 
      'description' => 'The API Key created within a service.', 
      'encrypt' => true, 
      'required' => true
    ], 
    'mode' => [
      'label' => 'Api Key Mode', 
      'description' => 'Where should the Api Key be placed', 
      'type' => 'select', 
      'options' => [
        'Header' => 'header', 
        'Query Param' => 'query'
      ], 
      'default' => 'query'
    ], 
    'field_name' => [
      'label' => 'Parameter Name', 
      'description' => 'Name to use to pass the Api Key (?parameterName=apiKey)', 
      'required' => true, 
      'default' => 'key'
    ]
  ]
];
