aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/bshaffer
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-11 18:18:57 +0000
committerMario <mario@mariovavti.com>2022-10-11 18:18:57 +0000
commit5e5f0aa955d86743a14531bed98501b59140ab1f (patch)
treef8a7bbff876adf28d03cc005b8e0a0602886ffc8 /vendor/bshaffer
parentf9a4c53e3feb07e5319b110b25b4746ae839c420 (diff)
downloadvolse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.tar.gz
volse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.tar.bz2
volse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.zip
update composer libs
Diffstat (limited to 'vendor/bshaffer')
-rw-r--r--vendor/bshaffer/oauth2-server-php/src/OAuth2/TokenType/Bearer.php2
-rw-r--r--vendor/bshaffer/oauth2-server-php/test/OAuth2/TokenType/BearerTest.php11
2 files changed, 12 insertions, 1 deletions
diff --git a/vendor/bshaffer/oauth2-server-php/src/OAuth2/TokenType/Bearer.php b/vendor/bshaffer/oauth2-server-php/src/OAuth2/TokenType/Bearer.php
index 8ac8596ac..aa1094b1e 100644
--- a/vendor/bshaffer/oauth2-server-php/src/OAuth2/TokenType/Bearer.php
+++ b/vendor/bshaffer/oauth2-server-php/src/OAuth2/TokenType/Bearer.php
@@ -109,7 +109,7 @@ class Bearer implements TokenTypeInterface
}
$contentType = $request->server('CONTENT_TYPE');
- if (false !== $pos = strpos($contentType, ';')) {
+ if (false !== $pos = strpos((string) $contentType, ';')) {
$contentType = substr($contentType, 0, $pos);
}
diff --git a/vendor/bshaffer/oauth2-server-php/test/OAuth2/TokenType/BearerTest.php b/vendor/bshaffer/oauth2-server-php/test/OAuth2/TokenType/BearerTest.php
index 71cca3bd9..021fc7f5a 100644
--- a/vendor/bshaffer/oauth2-server-php/test/OAuth2/TokenType/BearerTest.php
+++ b/vendor/bshaffer/oauth2-server-php/test/OAuth2/TokenType/BearerTest.php
@@ -35,6 +35,17 @@ class BearerTest extends TestCase
$this->assertEquals($response->getParameter('error_description'), 'The content type for POST requests must be "application/x-www-form-urlencoded"');
}
+ public function testMissingContentTypeExpectsToBeCorrectContent()
+ {
+ $bearer = new Bearer();
+ $request = TestRequest::createPost(array(
+ 'access_token' => 'ThisIsMyAccessToken'
+ ));
+
+ $param = $bearer->getAccessTokenParameter($request, $response = new Response());
+ $this->assertEquals($param, 'ThisIsMyAccessToken');
+ }
+
public function testValidRequestUsingAuthorizationHeader()
{
$bearer = new Bearer();