logger = $logger; } #[\Override] public function authenticate(RegistrationInterface $registration, string $loginHint): UserAuthenticationResultInterface { $user = \User::find($loginHint); $identity = null; $tool = null; if ($registration instanceof Registration) { $tool = $registration->getLtiTool(); } else { $tool = \LtiTool::find($registration->getIdentifier()); } if ($user && $tool) { $identity = new Identity($user, $tool); } return new UserAuthenticationResult($user instanceof \User, $identity); } }