src/OAuth2/OpenID/Controller/UserInfoController.php
public function handleUserInfoRequest(RequestInterface $request, ResponseInterface $response)
    {
        if (!$this->verifyResourceRequest($request, $response, 'openid')) {
            return;
        }

        $token = $this->getToken();
        $claims = $this->userClaimsStorage->getUserClaims($token['user_id'], $token['scope']);
        // The sub Claim MUST always be returned in the UserInfo Response.
        // http://openid.net/specs/openid-connect-core-1_0.html#UserInfoResponse
        $claims += array(
            'sub' => $token['user_id'],
        );
        $response->addParameters($claims);
    }
public function handleUserInfoRequest(RequestInterface $request, ResponseInterface $response)
    {
        if (!$this->verifyResourceRequest($request, $response, 'openid')) {
            return;
        }

        $token = $this->getToken();
        $claims = $this->userClaimsStorage->getUserClaims($token['user_id'], $token['scope']);
        // The sub Claim MUST always be returned in the UserInfo Response.
        // http://openid.net/specs/openid-connect-core-1_0.html#UserInfoResponse
        $claims += array(
            'sub' => $token['user_id'],
        );
        $response->addParameters($claims);
    }
public function handleUserInfoRequest ( RequestInterface $ request , ResponseInterface $ response ) { if ( ! $ this -> verifyResourceRequest ( $ request , $ response , 'openid' ) ) { return ; } $ token = $ this -> getToken ( ) ; $ claims = $ this -> userClaimsStorage -> getUserClaims ( $ token [ 'user_id' ] , $ token [ 'scope' ] ) ; // The sub Claim MUST always be returned in the UserInfo Response. // http://openid.net/specs/openid-connect-core-1_0.html#UserInfoResponse $ claims += array ( 'sub' => $ token [ 'user_id' ] , ) ; $ response -> addParameters ( $ claims ) ; }
Handle the user info request

@param RequestInterface $request
@param ResponseInterface $response
@return void
Handle the user info request