3 use serde_json
::{json, Value}
;
5 use proxmox
::api
::{api, Permission}
;
6 use proxmox
::api
::router
::Router
;
8 use crate::api2
::types
::*;
12 description
: "List of realms.",
16 description
: "User configuration (without password).",
19 description
: "Realm ID.",
23 schema
: SINGLE_LINE_COMMENT_SCHEMA
,
27 description
: "Default realm.",
34 description
: "Anyone can access this, because we need that list for the login box (before the user is authenticated).",
35 permission
: &Permission
::World
,
38 /// Authentication domain/realm index.
39 fn list_domains() -> Result
<Value
, Error
> {
40 let mut list
= Vec
::new();
41 list
.push(json
!({ "realm": "pam", "comment": "Linux PAM standard authentication", "default": true }
));
42 list
.push(json
!({ "realm": "pbs", "comment": "Proxmox Backup authentication server" }
));
46 pub const ROUTER
: Router
= Router
::new()
47 .get(&API_METHOD_LIST_DOMAINS
);