Skip to content

Commit

Permalink
Bugfix for the AuthToken and Hmac header line config.
Browse files Browse the repository at this point in the history
Mentioned in discussion #1167
  • Loading branch information
alxjzx100 committed Aug 16, 2024
1 parent 0aaa04b commit b70b0bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Filters/HmacAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function before(RequestInterface $request, $arguments = null)
$authenticator = auth('hmac')->getAuthenticator();

$requestParams = [
'token' => $request->getHeaderLine(setting('Auth.authenticatorHeader')['hmac'] ?? 'Authorization'),
'token' => $request->getHeaderLine(setting('AuthToken.authenticatorHeader')['hmac'] ?? 'Authorization'),
'body' => $request->getBody() ?? '',
];

Expand Down
2 changes: 1 addition & 1 deletion src/Filters/TokenAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function before(RequestInterface $request, $arguments = null)
$authenticator = auth('tokens')->getAuthenticator();

$result = $authenticator->attempt([
'token' => $request->getHeaderLine(setting('Auth.authenticatorHeader')['tokens'] ?? 'Authorization'),
'token' => $request->getHeaderLine(setting('AuthToken.authenticatorHeader')['tokens'] ?? 'Authorization'),
]);

if (! $result->isOK() || (! empty($arguments) && $result->extraInfo()->tokenCant($arguments[0]))) {
Expand Down

0 comments on commit b70b0bd

Please sign in to comment.