Skip to content

Commit 3214dfc

Browse files
authored
Merge pull request #1169 from alxjzx100/Bugfix-AuthToken-Hmac-config
fix: Shield ignores `AuthToken::$authenticatorHeader` config
2 parents e17a042 + b70b0bd commit 3214dfc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Filters/HmacAuth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function before(RequestInterface $request, $arguments = null)
3333
$authenticator = auth('hmac')->getAuthenticator();
3434

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

src/Filters/TokenAuth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function before(RequestInterface $request, $arguments = null)
5252
$authenticator = auth('tokens')->getAuthenticator();
5353

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

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

0 commit comments

Comments
 (0)