services:
    _defaults:
        public: true

    Oro\Bundle\OAuth2ServerBundle\Controller\ClientController:
        arguments:
            - '%oro_oauth2_server.supported_grant_types%'
            - '@oro_oauth2_server.api_feature_checker'
        calls:
            - [setContainer, ['@Psr\Container\ContainerInterface']]
        tags:
            - { name: container.service_subscriber }

    Oro\Bundle\OAuth2ServerBundle\Controller\LoginController:
        calls:
            - [setContainer, ['@Psr\Container\ContainerInterface']]
        tags:
            - { name: container.service_subscriber }

    Oro\Bundle\OAuth2ServerBundle\Controller\AuthorizeClientController:
        calls:
            - [setContainer, ['@Psr\Container\ContainerInterface']]
        tags:
            - { name: container.service_subscriber }
            - { name: container.service_subscriber, id: oro_oauth2_server.handler.authorize_client.handler, key: Oro\Bundle\OAuth2ServerBundle\Handler\AuthorizeClient\AuthorizeClientHandler }
            - { name: container.service_subscriber, id: oro_oauth2_server.handler.authorize_client.exception_handler, key: Oro\Bundle\OAuth2ServerBundle\Handler\AuthorizeClient\Exception\ExceptionHandler }

    Oro\Bundle\OAuth2ServerBundle\Controller\AuthorizationTokenController:
        calls:
            - [setContainer, ['@Psr\Container\ContainerInterface']]
        tags:
            - { name: container.service_subscriber }
