public function getChallenge()
    {
        if (empty($this->_challenge))
        {
            $output = $this->postRequest(
                'identification/securitytoken/challenge',
                [
                    'useEasyLogin'        => false,
                    'generateEasyLoginId' => false,
                    'userId'              => $this->_username,
                ]
            );

            if (!isset($output->links->next->uri))
                throw new Exception('Cannot fetch control number. Check if the username is correct.', 10);

            $this->_challenge          = $output->challenge;
            $this->_useOneTimePassword = (bool)$output->useOneTimePassword;
        }

        return $this->_challenge;
    }
public function getChallenge()
    {
        if (empty($this->_challenge))
        {
            $output = $this->postRequest(
                'identification/securitytoken/challenge',
                [
                    'useEasyLogin'        => false,
                    'generateEasyLoginId' => false,
                    'userId'              => $this->_username,
                ]
            );

            if (!isset($output->links->next->uri))
                throw new Exception('Cannot fetch control number. Check if the username is correct.', 10);

            $this->_challenge          = $output->challenge;
            $this->_useOneTimePassword = (bool)$output->useOneTimePassword;
        }

        return $this->_challenge;
    }
public function getChallenge ( ) { if ( empty ( $ this -> _challenge ) ) { $ output = $ this -> postRequest ( 'identification/securitytoken/challenge' , [ 'useEasyLogin' => false , 'generateEasyLoginId' => false , 'userId' => $ this -> _username , ] ) ; if ( ! isset ( $ output -> links -> next -> uri ) ) throw new Exception ( 'Cannot fetch control number. Check if the username is correct.' , 10 ) ; $ this -> _challenge = $ output -> challenge ; $ this -> _useOneTimePassword = ( bool ) $ output -> useOneTimePassword ; } return $ this -> _challenge ; }
Fetch control number

For security token with control number and response code.

@return string|null Control number. Null if the security token only requires a generated one time code.
@throws Exception
Fetch control number