webex_client-1.0.5/src/AuthServiceInterface.php

src/AuthServiceInterface.php
<?php

declare(strict_types=1);

namespace Drupal\webex_client;

/**
 * Interface for handling authentication services with Webex.
 *
 * This interface defines methods for retrieving access tokens using both
 * authorization code and refresh token grant types. Implementing classes
 * should provide the actual logic for these methods.
 */
interface AuthServiceInterface {

  /**
   * Constant for the authorization code grant type.
   */
  public const WEBEX_AUTH_CODE = 'authorization_code';

  /**
   * Constant for the refresh token grant type.
   */
  public const WEBEX_REFRESH_TOKEN = 'refresh_token';

  /**
   * Retrieves an access token using the provided authorization code.
   *
   * @param string $code
   *   The authorization code received from the OAuth flow.
   * @param string $wId
   *   The Webex identifier for the user.
   *
   * @return false|string
   *   The access token for the authenticated user.
   */
  public function accessToken(string $code, string $wId): false|string;

  /**
   * Refreshes the access token using a refresh token.
   *
   * @return false|string
   *   The new access token for the authenticated user.
   */
  public function refreshToken(): false|string;

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc