From: "Shan Shaji" <s.shaji@proxmox.com>
To: "Azharul Haque" <haque@azharul.com>, <pve-devel@lists.proxmox.com>
Subject: Re: [PATCH dart-api-client v2 1/2] fix #4281: access: add `type` property to `PveAccessDomainModel`
Date: Thu, 20 Aug 2026 11:17:53 +0200 [thread overview]
Message-ID: <DKTNPWM6H17G.GQC5P7DWS8BR@proxmox.com> (raw)
In-Reply-To: <20260810144713.75806-2-haque@azharul.com>
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.
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 <haque@azharul.com>
> ---
> 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<PveAccessDomainModel, PveAccessDomainModelBuilder> {
> // 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 = _$openid;
static const ProxmoxAccessDomainType pve = _$pve;
static const ProxmoxAccessDomainType pam = _$pam;
const ProxmoxAccessDomainType._(String name) : super(name);
static BuiltSet<ProxmoxAccessDomainType> get values => _$pveAccessDomainTypeValues;
static ProxmoxAccessDomainType valueOf(String name) => _$pveAccessDomainTypeValueOf(name);
static Serializer<ProxmoxAccessDomainType> get serializer => _$pveAccessDomainTypeSerializer;
}
> String? get comment;
> String? get tfa;
> @BuiltValueField(wireName: 'default')
> int? get defaultValue;
>
> bool get isDefaultRealm => defaultValue == 1;
> + bool get isOpenIdRealm => type == 'openid';
> PveAccessDomainModel._();
>
next prev parent reply other threads:[~2026-08-20 9:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 5:40 [PATCH 0/2] android: register OpenID Connect callback activity for #4281 Azharul Haque
2026-08-10 5:40 ` [PATCH 1/2] fix #4281: android: register OpenID Connect callback activity Azharul Haque
2026-08-10 5:40 ` [PATCH 2/2] fix #4281: android: match renamed OpenID callback scheme Azharul Haque
2026-08-10 13:59 ` [PATCH 0/2] android: register OpenID Connect callback activity for #4281 Shan Shaji
2026-08-10 14:47 ` [PATCH v2 0/7] app: implement OpenID Connect (OAuth) realm login (#4281) Azharul Haque
2026-08-10 14:47 ` [PATCH dart-api-client v2 1/2] fix #4281: access: add `type` property to `PveAccessDomainModel` Azharul Haque
2026-08-20 9:17 ` Shan Shaji [this message]
[not found] ` <CAFCWXbiQxG4p2U+beMjSi7Gaz5qC-vCzXW1AH3Ys-ApOW0S83w@mail.gmail.com>
2026-08-20 14:39 ` Shan Shaji
[not found] ` <CAFCWXbhnW0o1VcUimwk6pUB3VqCaQw31BQpuHjDtKF8LGeB-fg@mail.gmail.com>
2026-08-21 8:00 ` Shan Shaji
2026-08-10 14:47 ` [PATCH dart-api-client v2 2/2] fix #4281: access: add OpenID Connect auth-url/login helpers Azharul Haque
2026-08-20 9:48 ` Shan Shaji
2026-08-10 14:47 ` [PATCH login-manager v2 1/3] fix #4281: ui: add OpenID Connect login flow to login form Azharul Haque
2026-08-20 12:31 ` Shan Shaji
2026-08-10 14:47 ` [PATCH login-manager v2 2/3] fix #4281: ui: fix stale Continue button state on realm switch Azharul Haque
2026-08-10 14:47 ` [PATCH login-manager v2 3/3] fix #4281: ui: use a namespaced OpenID callback scheme Azharul Haque
2026-08-20 14:28 ` Shan Shaji
2026-08-10 14:47 ` [PATCH flutter-frontend v2 1/2] fix #4281: android: register OpenID Connect callback activity Azharul Haque
2026-08-20 14:01 ` Shan Shaji
2026-08-10 14:47 ` [PATCH flutter-frontend v2 2/2] fix #4281: android: match renamed OpenID callback scheme Azharul Haque
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DKTNPWM6H17G.GQC5P7DWS8BR@proxmox.com \
--to=s.shaji@proxmox.com \
--cc=haque@azharul.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox