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

return [
  'type' => 'oauth', 
  'name' => 'mailchimp', 
  'title' => 'Mailchimp OAuth', 
  'description' => 'Token based authentication', 
  'documentation' => 'https://developer.mailchimp.com/api/authentication', 
  'icon' => $filter->apply('url', '~yooessentials_url/modules/auth/drivers/Mailchimp/icon.svg', $file), 
  'endpoints' => [
    'oauth' => 'https://oauth.zoolanders.com/mailchimp', 
    'presave' => 'yooessentials/auth/mailchimp/oauth'
  ], 
  'fields' => [
    'name' => [
      'label' => 'Name', 
      'description' => 'Optional name to identify this auth.'
    ], 
    '_oauth_title' => [
      'label' => 'Authentication', 
      'type' => 'yooessentials-info'
    ], 
    '_oauth' => [
      'type' => 'yooessentials-oauth-grant', 
      'description' => 'Authenticate to a Mailchimp Account and grant access permissions to our Auth App, you can revoke those anytime.'
    ], 
    'accessToken' => [
      'label' => 'Access Token', 
      'encrypt' => true, 
      'show' => false
    ], 
    'dc' => [
      'label' => 'DC', 
      'show' => false
    ]
  ]
];
