| 1 |
<?php |
| 2 |
|
| 3 |
namespace AATXT\App\AIProviders\Contracts; |
| 4 |
|
| 5 |
/** |
| 6 |
* Interface for AI providers that require API key authentication. |
| 7 |
* |
| 8 |
* Following the Interface Segregation Principle, this interface defines |
| 9 |
* only the methods related to authentication validation. |
| 10 |
*/ |
| 11 |
interface RequiresAuthentication |
| 12 |
{ |
| 13 |
/** |
| 14 |
* Validate that the provider has valid credentials configured. |
| 15 |
* |
| 16 |
* This method checks if the API key and any other required |
| 17 |
* credentials are present and properly formatted. |
| 18 |
* |
| 19 |
* @return bool True if credentials are valid, false otherwise |
| 20 |
*/ |
| 21 |
public function validateCredentials(): bool; |
| 22 |
|
| 23 |
/** |
| 24 |
* Check if the provider has an API key configured. |
| 25 |
* |
| 26 |
* @return bool True if API key is set, false otherwise |
| 27 |
*/ |
| 28 |
public function hasApiKey(): bool; |
| 29 |
} |
| 30 |
|