SASL OAuth rename 3rd parameter to accessToken

This commit is contained in:
the-djmaze 2024-03-27 01:23:48 +01:00
parent b6df50546e
commit 35db1f4eb8
2 changed files with 4 additions and 4 deletions

View file

@ -10,11 +10,11 @@ class OAuthBearer extends \SnappyMail\SASL
{
public function authenticate(string $username,
#[\SensitiveParameter]
string $passphrase,
string $accessToken,
?string $authzid = null
) : string
{
return $this->encode("n,a={$username},\x01auth=Bearer {$passphrase}\x01\x01");
return $this->encode("n,a={$username},\x01auth=Bearer {$accessToken}\x01\x01");
}
public static function isSupported(string $param) : bool

View file

@ -10,11 +10,11 @@ class XOAuth2 extends \SnappyMail\SASL
{
public function authenticate(string $username,
#[\SensitiveParameter]
string $passphrase,
string $accessToken,
?string $authzid = null
) : string
{
return $this->encode("user={$username}\x01auth=Bearer {$passphrase}\x01\x01");
return $this->encode("user={$username}\x01auth=Bearer {$accessToken}\x01\x01");
}
public static function isSupported(string $param) : bool