use of io.vertx.ext.auth.mongo.MongoAuth in project vertx-auth by vert-x3.
the class AuthMongoExamples method example1.
public void example1(Vertx vertx, JsonObject mongoClientConfig) {
MongoClient client = MongoClient.createShared(vertx, mongoClientConfig);
JsonObject authProperties = new JsonObject();
MongoAuth authProvider = MongoAuth.create(client, authProperties);
}
use of io.vertx.ext.auth.mongo.MongoAuth in project vertx-auth by vert-x3.
the class MongoAuthPBKDF2Test method createProvider.
@Override
protected MongoAuth createProvider() throws Exception {
JsonObject config = new JsonObject();
config.put(MongoAuth.PROPERTY_COLLECTION_NAME, createCollectionName(MongoAuth.DEFAULT_COLLECTION_NAME));
config.put(MongoAuth.PROPERTY_SALT_STYLE, HashSaltStyle.COLUMN);
MongoAuth mongoAuth = MongoAuth.create(getMongoClient(), config);
mongoAuth.getHashStrategy().setAlgorithm(HashAlgorithm.PBKDF2);
return mongoAuth;
}
use of io.vertx.ext.auth.mongo.MongoAuth in project vertx-auth by vert-x3.
the class AuthMongoExamples method example5.
public void example5(Vertx vertx, JsonObject mongoClientConfig) {
MongoClient client = MongoClient.createShared(vertx, mongoClientConfig);
JsonObject authProperties = new JsonObject();
MongoAuth authProvider = MongoAuth.create(client, authProperties);
authProvider.setHashAlgorithm(HashAlgorithm.PBKDF2);
}
Aggregations