+16
src/Events/LegacyUserAuthenticated.php
+16
src/Events/LegacyUserAuthenticated.php
···
1
+
<?php
2
+
3
+
namespace SocialDept\AtpClient\Events;
4
+
5
+
use Illuminate\Foundation\Events\Dispatchable;
6
+
use Illuminate\Queue\SerializesModels;
7
+
use SocialDept\AtpClient\Data\AccessToken;
8
+
9
+
class LegacyUserAuthenticated
10
+
{
11
+
use Dispatchable, SerializesModels;
12
+
13
+
public function __construct(
14
+
public readonly AccessToken $token,
15
+
) {}
16
+
}
+3
src/Session/SessionManager.php
+3
src/Session/SessionManager.php
···
8
8
use SocialDept\AtpClient\Contracts\CredentialProvider;
9
9
use SocialDept\AtpClient\Contracts\KeyStore;
10
10
use SocialDept\AtpClient\Data\AccessToken;
11
+
use SocialDept\AtpClient\Events\LegacyUserAuthenticated;
11
12
use SocialDept\AtpClient\Events\TokenRefreshed;
12
13
use SocialDept\AtpClient\Events\TokenRefreshing;
13
14
use SocialDept\AtpClient\Exceptions\AuthenticationException;
···
102
103
103
104
// Store credentials using DID as key
104
105
$this->credentials->storeCredentials($did, $token);
106
+
107
+
event(new LegacyUserAuthenticated($token));
105
108
106
109
return $this->createSession($did);
107
110
}