Skip to content

Commit 7d420d9

Browse files
Merge pull request #85 from apivideo/fix-php-authentication-exception
fix(php): Added missing AuthenticationFailedException
2 parents bdce91f + 2505e21 commit 7d420d9

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22
All changes to this project will be documented in this file.
33

4+
## [1.3.1] - 2023-06-28
5+
- Added missing AuthenticationFailedException
6+
47
## [1.3.0] - 2023-06-28
58
- Introducing new live streams restream feature
69
- Introducing new analytics endpoints

src/BaseClient.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace ApiVideo\Client;
44

5+
use ApiVideo\Client\Exception\AuthenticationFailedException;
56
use ApiVideo\Client\Exception\ExpiredAuthTokenException;
67
use ApiVideo\Client\Exception\HttpException;
78
use ApiVideo\Client\Resource\Video\Video;
@@ -77,15 +78,15 @@ public function __construct(string $baseUri, ?string $apiKey, ClientInterface $h
7778
$this->originSdkHeaderValue = "";
7879

7980
if ($apiKey) {
80-
$this->authenticator = new Authenticator($this, $apiKey, 'php:1.3.0');
81+
$this->authenticator = new Authenticator($this, $apiKey, 'php:1.3.1');
8182
}
8283
}
8384

8485
/**
8586
* @param Request $commandRequest
8687
*
8788
* @return array|null
88-
* @throws ClientExceptionInterface
89+
* @throws ClientExceptionInterface|AuthenticationFailedException
8990
*/
9091
public function request(Request $commandRequest, bool $skipAuthRequest = false): ?array
9192
{
@@ -110,7 +111,7 @@ public function request(Request $commandRequest, bool $skipAuthRequest = false):
110111
if($this->originSdkHeaderValue) {
111112
$request = $request->withHeader('AV-Origin-Sdk', $this->originSdkHeaderValue);
112113
}
113-
$request = $request->withHeader('AV-Origin-Client', 'php:1.3.0');
114+
$request = $request->withHeader('AV-Origin-Client', 'php:1.3.1');
114115

115116
return $this->sendRequest($request, $skipAuthRequest);
116117
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace ApiVideo\Client\Exception;
4+
5+
class AuthenticationFailedException extends \Exception implements ExceptionInterface
6+
{
7+
8+
}

0 commit comments

Comments
 (0)