protected function createAuthorizationServer(Container $container, array $config)
    {
        // TODO: Support scopes

        $authorizationServer = $container->make(AuthorizationServer::class);

        $authorizationServer->setSessionStorage($container->make(SessionInterface::class));
        $authorizationServer->setAccessTokenStorage($container->make(AccessTokenInterface::class));
        $authorizationServer->setRefreshTokenStorage($container->make(RefreshTokenInterface::class));
        $authorizationServer->setClientStorage($container->make(ClientInterface::class));
        $authorizationServer->setScopeStorage($container->make(ScopeInterface::class));
        $authorizationServer->setAuthCodeStorage($container->make(AuthCodeInterface::class));

        $this->configureAuthorizationServer($authorizationServer, $config);

        return $authorizationServer;
    }