Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Security/AuthTokenAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ public function authenticate(Request $request): Passport
$matches = [];
if (!preg_match('/^Bearer (.+)$/', $authorizationHeader, $matches)) {
// The Authorization header was improperly formatted, authentication fails
$this->mcpLogger->debug("Invalid authorization header format. Expecting: 'Bearer <token>', but got '$authorizationHeader'");
$this->mcpLogger->debug("Invalid authorization header format. Expecting: 'Bearer <token>'.");
throw new CustomUserMessageAuthenticationException('Invalid authorization header format. Expecting: Bearer <token>');
}
$token = $matches[1];
$this->mcpLogger->debug("Authorization header format Ok.");
$this->mcpLogger->debug("Bearer token = '$token'.");
$this->mcpLogger->debug("Bearer token received.");
return new SelfValidatingPassport(new UserBadge($token), []);
}

Expand Down
Loading