You are here

public function BrightcoveAPIClient::setAccessToken in Brightcove Video Connect 3.x

Same name and namespace in other branches
  1. 8.2 src/Entity/BrightcoveAPIClient.php \Drupal\brightcove\Entity\BrightcoveAPIClient::setAccessToken()
  2. 8 src/Entity/BrightcoveAPIClient.php \Drupal\brightcove\Entity\BrightcoveAPIClient::setAccessToken()

Sets access token.

Parameters

string $access_token: The access token.

int $expire: The time for which the token is valid in seconds.

Return value

$this

Overrides BrightcoveAPIClientInterface::setAccessToken

1 call to BrightcoveAPIClient::setAccessToken()
BrightcoveAPIClient::authorizeClient in src/Entity/BrightcoveAPIClient.php
Authorize client with Brightcove API and store client on the entity.

File

src/Entity/BrightcoveAPIClient.php, line 254

Class

BrightcoveAPIClient
Defines the Brightcove API Client entity.

Namespace

Drupal\brightcove\Entity

Code

public function setAccessToken($access_token, $expire) {
  $this->key_value_expirable_store
    ->setWithExpire($this->client_id, $access_token, $expire);
  return $this;
}