public FiwareService(IEntityService entityService, IAbeAuthBuilder abeAuthBuilder, IDataSymmetricEncryptor encryptor, IOptions <MainSettings> options) { _entityService = entityService; _abeAuthBuilder = abeAuthBuilder; _encryptor = encryptor; _options = options; sessions = new List <Session>(); }
public TokensService(IAbeAuthBuilder abeAuthBuilder, IAbeDecorator abeDecorator, IOptions <MainSettings> options, IOptions <DatabaseSettings> dbOptions) { _abeAuthBuilder = abeAuthBuilder; _abeDecorator = abeDecorator; _options = options; _dbOptions = dbOptions; var client = new MongoClient(_dbOptions.Value.ConnectionString); var database = client.GetDatabase(_dbOptions.Value.DatabaseName); _sessions = database.GetCollection <Session>("sessions"); }