Fix oauthbearer encoding

This commit is contained in:
Akhil 2022-12-08 16:20:51 +05:30
parent 682af34d53
commit 95a84f8e62
No known key found for this signature in database
GPG key ID: 7C737B3BD58C0A26

View file

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