You are here

interface KnownClientsRepositoryInterface in Simple OAuth (OAuth2) & OpenID Connect 5.x

Same name and namespace in other branches
  1. 8.4 src/KnownClientsRepositoryInterface.php \Drupal\simple_oauth\KnownClientsRepositoryInterface
  2. 8.3 src/KnownClientsRepositoryInterface.php \Drupal\simple_oauth\KnownClientsRepositoryInterface

An interface that remembers known clients.

Hierarchy

Expanded class hierarchy of KnownClientsRepositoryInterface

All classes that implement KnownClientsRepositoryInterface

2 files declare their use of KnownClientsRepositoryInterface
Oauth2AuthorizeController.php in src/Controller/Oauth2AuthorizeController.php
Oauth2AuthorizeForm.php in src/Controller/Oauth2AuthorizeForm.php

File

src/KnownClientsRepositoryInterface.php, line 8

Namespace

Drupal\simple_oauth
View source
interface KnownClientsRepositoryInterface {

  /**
   * Checks if a given user authorized a client for a given set of scopes.
   *
   * @param int $uid
   *   The user ID.
   * @param string $client_id
   *   The client ID.
   * @param string[] $scopes
   *   List of scopes to authorize for.
   *
   * @return bool
   *   TRUE if the client is authorized, FALSE otherwise.
   *
   */
  public function isAuthorized($uid, $client_id, array $scopes);

  /**
   * Store a client with a set of scopes as authorized for a given user.
   *
   * Passed in scopes are merged with already accepted scopes for the given
   * client.
   *
   * @param int $uid
   *   The user ID.
   * @param string $client_id
   *   The client ID.
   * @param string[] $scopes
   *   List of scopes that shuld be authorized.
   */
  public function rememberClient($uid, $client_id, array $scopes);

}

Members

Namesort descending Modifiers Type Description Overrides
KnownClientsRepositoryInterface::isAuthorized public function Checks if a given user authorized a client for a given set of scopes. 1
KnownClientsRepositoryInterface::rememberClient public function Store a client with a set of scopes as authorized for a given user. 1