Skip to content

Commit

Permalink
Return messages with error response in authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
iampersistent committed Oct 6, 2023
1 parent ac6aeaf commit ed3fa8b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ public function authenticate(string $identity, string $credential): array
->setCredential($credential);

if (!$authLookup = $this->authAdapter->authenticateUser()) {
$result = $this->authAdapter->getResult();

return [
'reasonCode' => $this->authAdapter->getResult()?->getCode(),
'messages' => $result?->getMessages(),
'reasonCode' => $result?->getCode(),
'success' => false,
];
}
Expand Down

0 comments on commit ed3fa8b

Please sign in to comment.