You are here

ClientInterface.php in OAuth2 Server 8

Same filename and directory in other branches
  1. 2.0.x src/ClientInterface.php

File

src/ClientInterface.php
View source
<?php

namespace Drupal\oauth2_server;

use Drupal\Core\Config\Entity\ConfigEntityInterface;

/**
 * Defines the interface for client entities.
 *
 * @package Drupal\oauth2_server
 */
interface ClientInterface extends ConfigEntityInterface {

  /**
   * Returns the server the client belongs to.
   *
   * @return \Drupal\oauth2_server\ServerInterface
   *   Returns the server object the client belongs to.
   */
  public function getServer();

  /**
   * Hash a client secret for storage.
   *
   * Make sure this uses the same algorithm as checkClientCredentials form the
   * \OAuth2\StorageInterface.
   *
   * @param string $client_secret
   *   The raw secret.
   *
   * @return string
   *   The hashed secret.
   */
  public function hashClientSecret($client_secret);

}

Interfaces

Namesort descending Description
ClientInterface Defines the interface for client entities.