1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 18:48:00 +01: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
protected byte[] getAuthenticationText() throws SmackException {
// base64("\0" + user_name + "\0" + oauth_token)
return Base64.decode('\u0000' + authenticationId + '\u0000' + password);
return Base64.encode(toBytes('\u0000' + authenticationId + '\u0000' + password));
}
@Override