public function authorize_with_ro(
        $username,
        $password,
        $scope = 'openid',
        $connection = null,
        $id_token = null,
        $device = null
    )
    {
        $data = [
            'client_id' => $this->client_id,
            'username' => $username,
            'password' => $password,
            'scope' => $scope,
        ];
        if ($device !== null) {
            $data['device'] = $device;
        }

        if ($id_token !== null) {
            $data['id_token']   = $id_token;
            $data['grant_type'] = 'urn:ietf:params:oauth:grant-type:jwt-bearer';
        } else {
            if ($connection === null) {
                throw new ApiException(
                    'You need to specify a connection for grant_type=password authentication'
                );
            }

            $data['grant_type'] = 'password';
            $data['connection'] = $connection;
        }

        return $this->apiClient->post()
            ->oauth()
            ->ro()
            ->withHeader(new ContentType('application/json'))
            ->withBody(json_encode($data))
            ->call();
    }
public function authorize_with_ro(
        $username,
        $password,
        $scope = 'openid',
        $connection = null,
        $id_token = null,
        $device = null
    )
    {
        $data = [
            'client_id' => $this->client_id,
            'username' => $username,
            'password' => $password,
            'scope' => $scope,
        ];
        if ($device !== null) {
            $data['device'] = $device;
        }

        if ($id_token !== null) {
            $data['id_token']   = $id_token;
            $data['grant_type'] = 'urn:ietf:params:oauth:grant-type:jwt-bearer';
        } else {
            if ($connection === null) {
                throw new ApiException(
                    'You need to specify a connection for grant_type=password authentication'
                );
            }

            $data['grant_type'] = 'password';
            $data['connection'] = $connection;
        }

        return $this->apiClient->post()
            ->oauth()
            ->ro()
            ->withHeader(new ContentType('application/json'))
            ->withBody(json_encode($data))
            ->call();
    }
public function authorize_with_ro ( $ username , $ password , $ scope = 'openid' , $ connection = null , $ id_token = null , $ device = null ) { $ data = [ 'client_id' => $ this -> client_id , 'username' => $ username , 'password' => $ password , 'scope' => $ scope , ] ; if ( $ device !== null ) { $ data [ 'device' ] = $ device ; } if ( $ id_token !== null ) { $ data [ 'id_token' ] = $ id_token ; $ data [ 'grant_type' ] = 'urn:ietf:params:oauth:grant-type:jwt-bearer' ; } else { if ( $ connection === null ) { throw new ApiException ( 'You need to specify a connection for grant_type=password authentication' ) ; } $ data [ 'grant_type' ] = 'password' ; $ data [ 'connection' ] = $ connection ; } return $ this -> apiClient -> post ( ) -> oauth ( ) -> ro ( ) -> withHeader ( new ContentType ( 'application/json' ) ) -> withBody ( json_encode ( $ data ) ) -> call ( ) ; }
DEPRECATED - This endpoint is part of the legacy authentication pipeline and
has been replaced in favor of the Password Grant. For more information on the
latest authentication pipeline refer to Introducing OIDC Conformant
Authentication.

@deprecated 5.0.0, use `login` instead. Use only for passwordless verify

@param string      $username
@param string      $password
@param string      $scope
@param null|string $connection
@param null|string $id_token
@param null|string $device

@return mixed

@throws ApiException

@see https://auth0.com/docs/api/authentication#resource-owner
@see https://auth0.com/docs/api-auth/intro

@codeCoverageIgnore - Deprecated
DEPRECATED - This endpoint is part of the legacy authentication pipeline and has been replaced in favor of the Password Grant . For more information on the latest authentication pipeline refer to Introducing OIDC Conformant Authentication .