develop web ui have trouble

Discussion in 'Proxmox VE: Installation and configuration' started by haiwan, May 18, 2019.

  1. haiwan

    haiwan Member
    Proxmox Subscriber

    Joined:
    Apr 23, 2019
    Messages:
    68
    Likes Received:
    0
    Hi
    we write a pxomoxy web ui
    i no understand
    realm
    is what?
    public function __construct ($hostname, $username, $realm, $password, $port = 8006, $verify_ssl = false) {
    if (empty($hostname) || empty($username) || empty($realm) || empty($password) || empty($port)) {
    throw new PVE2_Exception("Hostname/Username/Realm/Password/Port required for PVE2_API object constructor.", 1);
    }
    // Check hostname resolves.
    if (gethostbyname($hostname) == $hostname && !filter_var($hostname, FILTER_VALIDATE_IP)) {
    throw new PVE2_Exception("Cannot resolve {$hostname}.", 2);
    }
    // Check port is between 1 and 65535.
    if (!filter_var($port, FILTER_VALIDATE_INT, ['options' => ['min_range' => 1, 'max_range' => 65535]])) {
    throw new PVE2_Exception("Port must be an integer between 1 and 65535.", 6);
    }
    // Check that verify_ssl is boolean.
    if (!is_bool($verify_ssl)) {
    throw new PVE2_Exception("verify_ssl must be boolean.", 7);
    }

    $this->hostname = $hostname;
    $this->username = $username;
    $this->realm = $realm;
    $this->password = $password;
    $this->port = $port;
    $this->verify_ssl = $verify_ssl;
    }
     
  2. LnxBil

    LnxBil Well-Known Member

    Joined:
    Feb 21, 2015
    Messages:
    3,761
    Likes Received:
    339
    There are different realms available:
    - pam
    - pve
    - e.g. ldap if configured

    root does always have pam as realm. Depending on how you created your users, you most probable have to add pve as a realm there.

    For future posts: please add CODE tags to properly format your code.
     
  3. haiwan

    haiwan Member
    Proxmox Subscriber

    Joined:
    Apr 23, 2019
    Messages:
    68
    Likes Received:
    0
    thanks.
    we company now open web system face proxmox.
    fulture need many support.
    thanks
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice