1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-06-30 07:24:51 +02:00

Fix SASL X-OAUTH2: Use Base64.encode() instead of decode()

This commit is contained in:
Florian Schmaus 2015-02-23 08:49:30 +01:00
parent 90969e252a
commit 180a3bb4ca

View file

@ -73,7 +73,7 @@ public class SASLXOauth2Mechanism extends SASLMechanism {
@Override @Override
protected byte[] getAuthenticationText() throws SmackException { protected byte[] getAuthenticationText() throws SmackException {
// base64("\0" + user_name + "\0" + oauth_token) // base64("\0" + user_name + "\0" + oauth_token)
return Base64.decode('\u0000' + authenticationId + '\u0000' + password); return Base64.encode(toBytes('\u0000' + authenticationId + '\u0000' + password));
} }
@Override @Override