services:
  _defaults:
    autowire: true
    autoconfigure: true
    bind:
      $profileRepository: '@xcart.repository.profile'
      $configRepository: '@xcart.repository.config'

  XCart\Security\UserProvider:
    class: XCart\Security\UserProvider

  XCart\Security\Hasher\PasswordHasher:
    class: XCart\Security\Hasher\PasswordHasher

  XCart\Security\Http\Authenticator\TokenRepository\RestApiTokenRepository: ~
  XCart\Security\Http\Authenticator\TokenRepository\StorefrontApiTokenRepository: ~

  XCart\Security\Http\EventListener\CheckCredentialsListenerDecorator:
    decorates: security.listener.check_authenticator_credentials
