File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
db-client-java/src/test/java/com/eventstore/dbclient/samples/authentication Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 22
33import com .eventstore .dbclient .EventStoreDBClient ;
44import com .eventstore .dbclient .EventStoreDBClientSettings ;
5+ import com .eventstore .dbclient .EventStoreDBConnectionString ;
56
67public class UserCertificate {
78 private static void tracing () {
89 // region client-with-user-certificates
9- EventStoreDBClientSettings settings = EventStoreDBClientSettings .builder ()
10- .tls (true )
11- .defaultClientCertificate ("/path/to/ca.crt" , "/path/to/ca.key" )
12- .defaultCredentials ("admin" , "changeit" )
13- .buildConnectionSettings ();
14-
10+ EventStoreDBClientSettings settings = EventStoreDBConnectionString
11+ .parseOrThrow ("esdb://admin:changeit@{endpoint}?tls=true&userCertFile={pathToCaFile}&userKeyFile={pathToKeyFile}" );
1512 EventStoreDBClient client = EventStoreDBClient .create (settings );
1613 // endregion client-with-user-certificates
1714 }
You can’t perform that action at this time.
0 commit comments