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
1 changed files with 1 additions and 1 deletions

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