Skip to content

Commit f20dbac

Browse files
committed
fix: introspection fails if not bearer token is present
1 parent b6a7c4a commit f20dbac

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Introspect.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,14 @@ protected function getIntrospectionResult()
2929
return $this->result;
3030
}
3131

32+
$token = $this->request->bearerToken();
33+
34+
if (empty($token)) {
35+
throw new AuthenticationException();
36+
}
37+
3238
try {
33-
$this->result = $this->client->introspect($this->request->bearerToken());
39+
$this->result = $this->client->introspect($token);
3440
} catch (RequestException $e) {
3541
if ($e->hasResponse()) {
3642
$result = json_decode((string) $e->getResponse()->getBody(), true);

0 commit comments

Comments
 (0)