<?php

namespace Da\OAuthServerBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

/**
 * @Template()
 */
class InfoController extends Controller
{
    /**
     * @Route("/infos", defaults={"_format"="json"})
     */
    public function getUserInfoAction()
    {
        $user = $this->get('security.context')->getToken()->getUser();

        return array(
            'username' => $user->getUsername(),
            'email' => $user->getEmail(),
            'roles' => json_encode($user->getRoles()),
            'raw' => $user->getRaw()
        );
    }
}

<?php

namespace Da\OAuthServerBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

/**
 * @Template()
 */
class InfoController extends Controller
{
    /**
     * @Route("/infos", defaults={"_format"="json"})
     */
    public function getUserInfoAction()
    {
        $user = $this->get('security.context')->getToken()->getUser();

        return array(
            'id' => $user->getId(),
            'username' => $user->getUsername(),
            'email' => $user->getEmail(),
            'roles' => json_encode($user->getRoles()),
            'raw' => $user->getRaw()
        );
    }
}

Add sso id to user info
Add sso id to user info
