2023-06-08 12:37:01 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
2024-04-12 06:15:41 +02:00
|
|
|
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
|
2023-06-08 12:37:01 +02:00
|
|
|
*
|
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\Auth;
|
|
|
|
|
|
|
|
use App\Http\Controllers\Controller;
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
|
|
|
|
class PasswordTimeoutController extends Controller
|
|
|
|
{
|
|
|
|
public function __invoke()
|
|
|
|
{
|
|
|
|
$cached = Cache::get(auth()->user()->hashed_id.'_'.auth()->user()->account_id.'_logged_in');
|
|
|
|
|
|
|
|
return $cached ? response()->json(['message' => 'Password is valid'], 200) : response()->json(['message' => 'Invalid Password'], 412);
|
|
|
|
}
|
|
|
|
}
|