1 20 21 package org.jivesoftware.smack.sasl; 22 23 import org.jivesoftware.smack.SASLAuthentication; 24 25 32 public class SASLPlainMechanism extends SASLMechanism { 33 34 public SASLPlainMechanism(SASLAuthentication saslAuthentication) { 35 super(saslAuthentication); 36 } 37 38 protected String getName() { 39 return "PLAIN"; 40 } 41 42 protected String getAuthenticationText(String username, String host, String password) { 43 StringBuffer text = new StringBuffer (); 46 text.append(username).append("@").append(host); 47 text.append('\0'); 48 text.append(username); 49 text.append('\0'); 50 text.append(password); 51 return text.toString(); 52 } 53 54 protected String getChallengeResponse(byte[] bytes) { 55 return null; 57 } 58 } 59 | Popular Tags |