File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /**
4+ * This file is part of the Nette Framework (https://nette.org)
5+ * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
6+ */
7+
8+ declare (strict_types=1 );
9+
10+ namespace Nette \Security ;
11+
12+
13+ /**
14+ * Restores Identity from storage.
15+ */
16+ interface IdentityRestorer
17+ {
18+ /**
19+ * Refreshes stored identity.
20+ */
21+ function restoreIdentity (IIdentity $ identity ): IIdentity ;
22+ }
Original file line number Diff line number Diff line change @@ -178,6 +178,9 @@ private function getStoredData(): void
178178 $ this ->identity = $ this ->storage ->getIdentity ();
179179 $ this ->logoutReason = $ this ->storage ->getLogoutReason ();
180180 }
181+ if ($ this ->authenticator instanceof IdentityRestorer) {
182+ $ this ->identity = $ this ->authenticator ->restoreIdentity ($ this ->identity );
183+ }
181184 }
182185
183186
You can’t perform that action at this time.
0 commit comments