Laravel AT Protocol Client (alpha & unstable)

Add authType property to AccessToken and Credentials

Changed files
+8
src
+5
src/Data/AccessToken.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data; 4 4 5 + use SocialDept\AtpClient\Enums\AuthType; 6 + 5 7 class AccessToken 6 8 { 7 9 public function __construct( ··· 12 14 public readonly ?string $handle = null, 13 15 public readonly ?string $issuer = null, 14 16 public readonly array $scope = [], 17 + public readonly AuthType $authType = AuthType::OAuth, 15 18 ) {} 16 19 17 20 /** ··· 32 35 handle: $handle, 33 36 issuer: $issuer, 34 37 scope: isset($data['scope']) ? explode(' ', $data['scope']) : [], 38 + authType: AuthType::OAuth, 35 39 ); 36 40 } 37 41 ··· 44 48 handle: $data['handle'] ?? $handle, 45 49 issuer: $issuer, 46 50 scope: ['atproto', 'transition:generic', 'transition:email'], 51 + authType: AuthType::Legacy, 47 52 ); 48 53 } 49 54 }
+3
src/Data/Credentials.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Data; 4 4 5 + use SocialDept\AtpClient\Enums\AuthType; 6 + 5 7 class Credentials 6 8 { 7 9 public function __construct( ··· 12 14 public readonly ?string $handle = null, 13 15 public readonly ?string $issuer = null, 14 16 public readonly array $scope = [], 17 + public readonly AuthType $authType = AuthType::OAuth, 15 18 ) {} 16 19 17 20 public function isExpired(): bool