addHeader('WWW-Authenticate', 'Basic realm="WebDAV", charset="UTF-8"'); } protected function validateUserPass($username, $password) { $user = User::where('email', $username)->first(); if ($user && Hash::check($password, $user->password)) { // THIS is the new required step $this->currentPrincipal = 'principals/' . $user->email; \Log::info('validateUserPass auth success', ['principal' => $this->currentPrincipal, 'username' => $username]); return true; } \Log::warning('validateUserPass auth failed', ['username' => $username]); return false; } public function getCurrentPrincipal() { \Log::debug('getCurrentPrincipal', ['current' => $$this->currentPrincipal]); return $this->currentPrincipal; } }