Created
August 18, 2014 15:16
-
-
Save FrancescaK/2eeee1537c3f888e776c to your computer and use it in GitHub Desktop.
kerberos_4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mongodb.*; | |
import javax.net.ssl.SSLSocketFactory; | |
import java.util.Arrays; | |
public class SSLApp { | |
public static void main(String args[]) throws Exception { | |
MongoClient m = new MongoClient(new MongoClientURI("mongodb://gssapitest%[email protected]/?authMechanism=GSSAPI&ssl=true")); | |
DB db = m.getDB( "test" ); | |
DBCollection c = db.getCollection( "test"); | |
System.out.println( c.findOne() ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment