openapi.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | OpenAPI模块配置
  6. |--------------------------------------------------------------------------
  7. |
  8. | OpenAPI模块的基础配置选项,专注于后台管理功能
  9. |
  10. */
  11. // 模块基础配置
  12. 'module' => [
  13. 'name' => 'OpenAPI',
  14. 'version' => '1.0.0',
  15. 'description' => '对外开放API管理模块',
  16. 'author' => 'System',
  17. ],
  18. // 应用配置
  19. 'app' => [
  20. 'auto_approve' => false, // 是否自动审核通过
  21. 'default_status' => 'PENDING',
  22. 'expire_days' => 365, // 应用过期天数
  23. 'max_apps_per_user' => 10,
  24. 'required_fields' => [
  25. 'name',
  26. 'description',
  27. 'callback_url',
  28. ],
  29. 'optional_fields' => [
  30. 'website',
  31. 'logo',
  32. 'contact_email',
  33. ],
  34. ],
  35. // API密钥配置
  36. 'api_key' => [
  37. 'length' => 32,
  38. 'prefix' => 'ak_',
  39. 'secret_length' => 64,
  40. 'secret_prefix' => 'sk_',
  41. 'auto_generate' => true,
  42. 'allow_regenerate' => true,
  43. 'expire_days' => 0, // 0表示永不过期
  44. ],
  45. ];