From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 850711FF0B2 for ; Thu, 20 Aug 2026 11:18:02 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 229812159C; Thu, 20 Aug 2026 11:18:01 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 20 Aug 2026 11:17:53 +0200 Message-Id: Subject: Re: [PATCH dart-api-client v2 1/2] fix #4281: access: add `type` property to `PveAccessDomainModel` From: "Shan Shaji" To: "Azharul Haque" , X-Mailer: aerc 0.20.0 References: <20260810144713.75806-1-haque@azharul.com> <20260810144713.75806-2-haque@azharul.com> In-Reply-To: <20260810144713.75806-2-haque@azharul.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787217448332 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.141 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy ENA_SUBJ_ODD_CASE 1.2 Subject has odd case KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 4VTI3PMWLT23WOKTKT4RTAQKIPBPPFIT X-Message-ID-Hash: 4VTI3PMWLT23WOKTKT4RTAQKIPBPPFIT X-MailFrom: s.shaji@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi, Thank you so much for working on this. I did a round of testing using keycloak and everything did worked well. Some comments inline.=20 On Mon Aug 10, 2026 at 4:47 PM CEST, Azharul Haque wrote: > The realm/domain list returned by /access/domains always includes a > `type` field (pam, pve, ldap, ad, openid, ...), but the model never > captured it. Without it, callers have no way to tell an OpenID Connect > realm apart from a password-based one, which is why the login form > falls back to showing username/password fields even for realms that > require a browser-based OpenID login. > > Add the property and an `isOpenIdRealm` convenience getter, used by > the login form in the following commits. > > Signed-off-by: Azharul Haque > --- > lib/src/models/pve_access_domain_model.dart | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/src/models/pve_access_domain_model.dart b/lib/src/models= /pve_access_domain_model.dart > index 6298bbe..a2fff31 100644 > --- a/lib/src/models/pve_access_domain_model.dart > +++ b/lib/src/models/pve_access_domain_model.dart > @@ -7,12 +7,14 @@ abstract class PveAccessDomainModel > implements Built = { > // Fields > String get realm; > + String get type; Instead of string type, wouldn't it be better to use an enum here as it's a fixed list of options? Like: class ProxmoxAccessDomainType extends EnumClass { static const ProxmoxAccessDomainType openid =3D _$openid; static const ProxmoxAccessDomainType pve =3D _$pve; static const ProxmoxAccessDomainType pam =3D _$pam; const ProxmoxAccessDomainType._(String name) : super(name); static BuiltSet get values =3D> _$pveAccessDomai= nTypeValues; static ProxmoxAccessDomainType valueOf(String name) =3D> _$pveAccessDomai= nTypeValueOf(name); static Serializer get serializer =3D> _$pveAcces= sDomainTypeSerializer; } > String? get comment; > String? get tfa; > @BuiltValueField(wireName: 'default') > int? get defaultValue; > =20 > bool get isDefaultRealm =3D> defaultValue =3D=3D 1; > + bool get isOpenIdRealm =3D> type =3D=3D 'openid'; > PveAccessDomainModel._(); > =20