Back to project page jive-android-core-sdk-example.
The source code is released under:
Apache License
If you think the Android project jive-android-core-sdk-example listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.jivesoftware.example.github; //w w w.j a va2s . c om import org.apache.http.Header; import org.apache.http.auth.Credentials; import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.impl.auth.BasicScheme; /** * Created by mark.schisler on 8/26/14. */ public class AuthenticationTokenFactory { public static String create(String username, String password) { Credentials credentials = new UsernamePasswordCredentials(username, password); Header authenticate = BasicScheme.authenticate(credentials, "IOS-8859-1", false); return authenticate.getValue(); } }