Retrieve username/password from database

Inject the current user & the repo to retrieve username/password from the database
This commit is contained in:
Jeremy Benoist
2017-05-01 22:13:17 +02:00
parent fc6d92c63d
commit 5a9bc00726
4 changed files with 49 additions and 13 deletions

View File

@ -63,7 +63,8 @@ services:
class: Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder
arguments:
- "@wallabag_core.graby.config_builder"
- "%sites_credentials%"
- "@=service('security.token_storage').getToken().getUser()"
- "@wallabag_core.site_credential_repository"
- '@logger'
tags:
- { name: monolog.logger, channel: graby }
@ -120,6 +121,12 @@ services:
arguments:
- WallabagCoreBundle:Tag
wallabag_core.site_credential_repository:
class: Wallabag\CoreBundle\Repository\SiteCredentialRepository
factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
arguments:
- WallabagCoreBundle:SiteCredential
wallabag_core.helper.entries_export:
class: Wallabag\CoreBundle\Helper\EntriesExport
arguments: