You are here

class AccessTokenValue in Simple OAuth (OAuth2) & OpenID Connect 8

Hierarchy

Expanded class hierarchy of AccessTokenValue

1 file declares its use of AccessTokenValue
AccessToken.php in src/Entity/AccessToken.php

File

src/AccessTokenValue.php, line 9

Namespace

Drupal\simple_oauth
View source
class AccessTokenValue implements AccessTokenValueInterface {

  /**
   * The entity values to digest.
   *
   * @var array
   */
  protected $values;

  /**
   * {@inheritdoc}
   */
  public function getValues() {
    return $this->values;
  }

  /**
   * {@inheritdoc}
   */
  public function setValues($values) {
    $this->values = $values;
  }

  /**
   * {@inheritdoc}
   */
  public static function createFromValues(array $values) {
    $token_value = new static();
    $token_value
      ->setValues($values);
    return $token_value;
  }

  /**
   * {@inheritdoc}
   */
  public function digest() {
    return Crypt::hmacBase64(Json::encode($this
      ->getValues()), Settings::getHashSalt());
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AccessTokenValue::$values protected property The entity values to digest.
AccessTokenValue::createFromValues public static function Factory method to create a token value from the entity values. Overrides AccessTokenValueInterface::createFromValues
AccessTokenValue::digest public function Digest the values to produce a token. Overrides AccessTokenValueInterface::digest
AccessTokenValue::getValues public function Gets the values. Overrides AccessTokenValueInterface::getValues
AccessTokenValue::setValues public function Sets the values. Overrides AccessTokenValueInterface::setValues