# auto-alt-text/3.0.3/src/App/AIProviders/Contracts/RequiresAuthentication.php

Auto Alt Text, version 3.0.3. 30 lines.

- Page: https://pluginprobe.com/plugins/auto-alt-text/3.0.3/code/src/App/AIProviders/Contracts/RequiresAuthentication.php
- Raw: https://pluginprobe.com/plugins/auto-alt-text/3.0.3/raw/src/App/AIProviders/Contracts/RequiresAuthentication.php
- Modified: 2026-01-14T13:38:28+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/auto-alt-text/3.0.3/code/src/App/AIProviders/Contracts/RequiresAuthentication.php#L10-L20`.

```php
<?php

namespace AATXT\App\AIProviders\Contracts;

/**
 * Interface for AI providers that require API key authentication.
 *
 * Following the Interface Segregation Principle, this interface defines
 * only the methods related to authentication validation.
 */
interface RequiresAuthentication
{
    /**
     * Validate that the provider has valid credentials configured.
     *
     * This method checks if the API key and any other required
     * credentials are present and properly formatted.
     *
     * @return bool True if credentials are valid, false otherwise
     */
    public function validateCredentials(): bool;

    /**
     * Check if the provider has an API key configured.
     *
     * @return bool True if API key is set, false otherwise
     */
    public function hasApiKey(): bool;
}

```
