mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-15 09:47:46 +05:30
Use first array result
This commit is contained in:
parent
f1d06e7c33
commit
419cb6d149
@ -79,7 +79,7 @@ class BearerTokenResponse extends AbstractResponseType
|
|||||||
public function determineAccessTokenInHeader(ServerRequestInterface $request)
|
public function determineAccessTokenInHeader(ServerRequestInterface $request)
|
||||||
{
|
{
|
||||||
$header = $request->getHeader('authorization');
|
$header = $request->getHeader('authorization');
|
||||||
$jwt = trim(preg_replace('/^(?:\s+)?Bearer\s/', '', $header));
|
$jwt = trim(preg_replace('/^(?:\s+)?Bearer\s/', '', $header[0]));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Attempt to parse and validate the JWT
|
// Attempt to parse and validate the JWT
|
||||||
|
Loading…
Reference in New Issue
Block a user