Search in sources :

Example 1 with MongoDbBasedCredentialsManagementService

use of org.eclipse.hono.deviceregistry.mongodb.service.MongoDbBasedCredentialsManagementService in project hono by eclipse.

the class ManagementServicesProducer method credentialsManagementService.

/**
 * Creates a Mongo DB based credentials management service.
 *
 * @param credentialsDao The DAO for accessing credentials data.
 * @param tenantInformationService The service for retrieving tenant information.
 * @return The service.
 */
@Produces
@Singleton
public CredentialsManagementService credentialsManagementService(final CredentialsDao credentialsDao, final TenantInformationService tenantInformationService) {
    final var service = new MongoDbBasedCredentialsManagementService(vertx, credentialsDao, credentialsServiceProperties, new SpringBasedHonoPasswordEncoder(credentialsServiceProperties.getMaxBcryptCostFactor()));
    service.setTenantInformationService(tenantInformationService);
    return service;
}
Also used : SpringBasedHonoPasswordEncoder(org.eclipse.hono.auth.SpringBasedHonoPasswordEncoder) MongoDbBasedCredentialsManagementService(org.eclipse.hono.deviceregistry.mongodb.service.MongoDbBasedCredentialsManagementService) Produces(javax.enterprise.inject.Produces) Singleton(javax.inject.Singleton)

Aggregations

Produces (javax.enterprise.inject.Produces)1 Singleton (javax.inject.Singleton)1 SpringBasedHonoPasswordEncoder (org.eclipse.hono.auth.SpringBasedHonoPasswordEncoder)1 MongoDbBasedCredentialsManagementService (org.eclipse.hono.deviceregistry.mongodb.service.MongoDbBasedCredentialsManagementService)1