src/SecucardConnect/Auth/OauthProvider.php
private function obtainDeviceVerification()
    {
        if (!$this->credentials instanceof DeviceCredentials) {
            throw new ClientError('Invalid credentials set up, must be of type ' . DeviceCredentials::class);
        }

        $params = [];
        $this->setParams($params, $this->credentials);

        // if the guzzle gets response http_status other than 200, it will throw an exception even when there is response available
        try {
            $response = $this->post($params);

            return MapperUtil::mapResponse($response, new AuthCodes(), $this->logger);
        } catch (ClientException $e) {
            throw $this->mapError($e, 'Error requesting device codes.');
        }
    }
private function obtainDeviceVerification()
    {
        if (!$this->credentials instanceof DeviceCredentials) {
            throw new ClientError('Invalid credentials set up, must be of type ' . DeviceCredentials::class);
        }

        $params = [];
        $this->setParams($params, $this->credentials);

        // if the guzzle gets response http_status other than 200, it will throw an exception even when there is response available
        try {
            $response = $this->post($params);

            return MapperUtil::mapResponse($response, new AuthCodes(), $this->logger);
        } catch (ClientException $e) {
            throw $this->mapError($e, 'Error requesting device codes.');
        }
    }
private function obtainDeviceVerification ( ) { if ( ! $ this -> credentials instanceof DeviceCredentials ) { throw new ClientError ( 'Invalid credentials set up, must be of type ' . DeviceCredentials :: class ) ; } $ params = [ ] ; $ this -> setParams ( $ params , $ this -> credentials ) ; // if the guzzle gets response http_status other than 200, it will throw an exception even when there is response available try { $ response = $ this -> post ( $ params ) ; return MapperUtil :: mapResponse ( $ response , new AuthCodes ( ) , $ this -> logger ) ; } catch ( ClientException $ e ) { throw $ this -> mapError ( $ e , 'Error requesting device codes.' ) ; } }
Function to get device verification codes.
@return mixed
@throws ClientError
@throws ApiError
@throws AuthError
@throws Exception
Function to get device verification codes .