concrete/src/Authentication/Type/ExternalConcrete5/Extractor.php
public function profileLoader()
    {
        $idTokenString = null;
        $token = $this->service->getStorage()->retrieveAccessToken($this->service->service());
        if ($token instanceof StdOAuth2Token) {
            $idTokenString = array_get($token->getExtraParams(), 'id_token');
        }

        // If we don't have a proper ID token, let's just fetch the data from the API
        if (!$idTokenString) {
            return json_decode($this->service->request(self::USER_PATH), true)['data'];
        }

        $decoder = new Parser();
        $idToken = $decoder->parse($idTokenString);

        return [
            'claims' => $idToken->getClaims()
        ];
    }
public function profileLoader()
    {
        $idTokenString = null;
        $token = $this->service->getStorage()->retrieveAccessToken($this->service->service());
        if ($token instanceof StdOAuth2Token) {
            $idTokenString = array_get($token->getExtraParams(), 'id_token');
        }

        // If we don't have a proper ID token, let's just fetch the data from the API
        if (!$idTokenString) {
            return json_decode($this->service->request(self::USER_PATH), true)['data'];
        }

        $decoder = new Parser();
        $idToken = $decoder->parse($idTokenString);

        return [
            'claims' => $idToken->getClaims()
        ];
    }
public function profileLoader ( ) { $ idTokenString = null ; $ token = $ this -> service -> getStorage ( ) -> retrieveAccessToken ( $ this -> service -> service ( ) ) ; if ( $ token instanceof StdOAuth2Token ) { $ idTokenString = array_get ( $ token -> getExtraParams ( ) , 'id_token' ) ; } // If we don't have a proper ID token, let's just fetch the data from the API if ( ! $ idTokenString ) { return json_decode ( $ this -> service -> request ( self :: USER_PATH ) , true ) [ 'data' ] ; } $ decoder = new Parser ( ) ; $ idToken = $ decoder -> parse ( $ idTokenString ) ; return [ 'claims' => $ idToken -> getClaims ( ) ] ; }
Load the external concrete5 profile, either from id_token or through the API

@return array

@throws \OAuth\Common\Exception\Exception
@throws \OAuth\Common\Storage\Exception\TokenNotFoundException
@throws \OAuth\Common\Token\Exception\ExpiredTokenException
Load the external concrete5 profile either from id_token or through the API