You are here

TokenInterface.php in OAuth2 Server 8

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

File

src/TokenInterface.php
View source
<?php

namespace Drupal\oauth2_server;

use Drupal\Core\Entity\ContentEntityInterface;

/**
 * Defines the interface for token entities.
 *
 * @package Drupal\oauth2_server
 */
interface TokenInterface extends ContentEntityInterface {

  /**
   * Return the user the token belongs to.
   *
   * @return \Drupal\user\UserInterface
   *   The user object or FALSE.
   */
  public function getUser();

  /**
   * Return the client the token belongs to.
   *
   * @return \Drupal\oauth2_server\ClientInterface
   *   The client object or FALSE.
   */
  public function getClient();

}

Interfaces

Namesort descending Description
TokenInterface Defines the interface for token entities.