Merge pull request #759 from e-foundation/oauthbearer-sasl-fix

Fix oauthbearer encoding
This commit is contained in:
the-djmaze 2022-12-08 12:05:37 +01:00 committed by GitHub
commit a2ec25fbd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,7 @@ class OAuth extends \SnappyMail\SASL
{
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