+1
src/Providers/ArrayCredentialProvider.php
+1
src/Providers/ArrayCredentialProvider.php
+11
src/Session/Session.php
+11
src/Session/Session.php
···
4
4
5
5
use SocialDept\AtpClient\Data\Credentials;
6
6
use SocialDept\AtpClient\Data\DPoPKey;
7
+
use SocialDept\AtpClient\Enums\AuthType;
7
8
8
9
class Session
9
10
{
···
61
62
public function hasScope(string $scope): bool
62
63
{
63
64
return in_array($scope, $this->credentials->scope, true);
65
+
}
66
+
67
+
public function authType(): AuthType
68
+
{
69
+
return $this->credentials->authType;
70
+
}
71
+
72
+
public function isLegacy(): bool
73
+
{
74
+
return $this->credentials->authType === AuthType::Legacy;
64
75
}
65
76
66
77
public function withCredentials(Credentials $credentials): self