<?php

namespace EasyLinkAutomations\Auth\Contracts;

if (!defined('ABSPATH')) {
    exit;
}

/**
 * Extended interface for platforms that use OAuth2 authentication.
 *
 * Adds the OAuth2-specific configuration (authorization URL, token URL,
 * scopes) needed to perform the Authorization Code flow.
 */
interface OAuth2PlatformAuthInterface extends PlatformAuthInterface
{
    /**
     * OAuth2 configuration for the Authorization Code flow.
     *
     * @return array{
     *     auth_url: string,
     *     token_url: string,
     *     scope: string,
     *     auth_params?: array<string, string>,
     *     token_params?: array<string, string>,
     *     token_client_auth?: string,
     *     refresh_client_auth?: string,
     *     include_scope_in_token_request?: bool,
     *     token_url_from_callback_param?: string,
     *     token_url_callback_path?: string,
     * }
     */
    public static function getOAuth2Config(): array;
}
