public static void main(String[] args) {
CouchbaseCluster cluster = CouchbaseCluster.create(
DefaultCouchbaseEnvironment.create(),
"localhost"//nodes
);
CouchbaseTemplate couchbaseTemplate = new CouchbaseTemplate(
cluster.clusterManager(
"user",//username
"auth-example"//password
).info(),
cluster.openBucket(
"auth",//name
"authauth"//password
)
);
StateTokenDao stateTokenDao = new StateTokenDao(couchbaseTemplate);
stateTokenDao.createStateToken(new StateToken("blablabla"));
System.out.println(stateTokenDao.findAndRemoveStateToken("blablabla"));
}
Created
December 12, 2019 13:51
-
-
Save bibarsov/112ecead963963a29180bb77afdf3dc1 to your computer and use it in GitHub Desktop.
Couchbase snippets
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment