Skip to content

Commit

Permalink
Merge pull request #1169 from alxjzx100/Bugfix-AuthToken-Hmac-config
Browse files Browse the repository at this point in the history
fix: Shield ignores `AuthToken::$authenticatorHeader` config
  • Loading branch information
kenjis authored Aug 17, 2024
2 parents e17a042 + b70b0bd commit 3214dfc
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 3214dfc

Please sign in to comment.