public function setAuthenticationInfo($userkey = '', $password = '', $applicationkey = '') {
        // Create AuthenticationInfo instance.
        $this->authinfo = new \Panopto\Auth\AuthenticationInfo();

        // Populate authentication settings.
        if (!empty($userkey)) {
            $this->authinfo->setUserKey($userkey);
        }

        if (!empty($password)) {
            $this->authinfo->setPassword($password);
        } else if (!empty($applicationkey)) {
            $authcode = $this->createAuthCode($userkey, $applicationkey);
            $this->authinfo->setAuthCode($authcode);
        }
    }