private function signInOptions($duration = null): array
    {
        $options = [];
        $options['auth'] = [
            $this->user->getMpxUsername(),
            $this->user->getMpxPassword(),
        ];

        // @todo Make this a class constant.
        $options['query'] = [
            'schema' => '1.0',
            'form' => 'json',
        ];

        // @todo move these to POST.
        // https://docs.theplatform.com/help/wsf-signin-method#signInmethod-JSONPOSTexample
        if (!empty($duration)) {
            // API expects this value in milliseconds, not seconds.
            $options['query']['_duration'] = $duration * 1000;
            $options['query']['_idleTimeout'] = $duration * 1000;
        }

        return $options;
    }
private function signInOptions($duration = null): array
    {
        $options = [];
        $options['auth'] = [
            $this->user->getMpxUsername(),
            $this->user->getMpxPassword(),
        ];

        // @todo Make this a class constant.
        $options['query'] = [
            'schema' => '1.0',
            'form' => 'json',
        ];

        // @todo move these to POST.
        // https://docs.theplatform.com/help/wsf-signin-method#signInmethod-JSONPOSTexample
        if (!empty($duration)) {
            // API expects this value in milliseconds, not seconds.
            $options['query']['_duration'] = $duration * 1000;
            $options['query']['_idleTimeout'] = $duration * 1000;
        }

        return $options;
    }
private function signInOptions ( $ duration = null ) : array { $ options = [ ] ; $ options [ 'auth' ] = [ $ this -> user -> getMpxUsername ( ) , $ this -> user -> getMpxPassword ( ) , ] ; // @todo Make this a class constant. $ options [ 'query' ] = [ 'schema' => '1.0' , 'form' => 'json' , ] ; // @todo move these to POST. // https://docs.theplatform.com/help/wsf-signin-method#signInmethod-JSONPOSTexample if ( ! empty ( $ duration ) ) { // API expects this value in milliseconds, not seconds. $ options [ 'query' ] [ '_duration' ] = $ duration * 1000 ; $ options [ 'query' ] [ '_idleTimeout' ] = $ duration * 1000 ; } return $ options ; }
Return the query parameters for signing in.

@param int $duration The duration to sign in for.

@return array An array of query parameters.
Return the query parameters for signing in .