Laravel AT Protocol Client (alpha & unstable)
1<?php
2
3namespace SocialDept\AtpClient\Contracts;
4
5use SocialDept\AtpClient\Data\AccessToken;
6use SocialDept\AtpClient\Data\Credentials;
7
8interface CredentialProvider
9{
10 /**
11 * Get credentials for the given DID
12 */
13 public function getCredentials(string $did): ?Credentials;
14
15 /**
16 * Store new credentials (initial OAuth or app password login)
17 */
18 public function storeCredentials(string $did, AccessToken $token): void;
19
20 /**
21 * Update credentials after token refresh
22 * CRITICAL: Refresh tokens are single-use!
23 */
24 public function updateCredentials(string $did, AccessToken $token): void;
25
26 /**
27 * Remove credentials
28 */
29 public function removeCredentials(string $did): void;
30}