TF-4049 Pre-fill OIDC login form

This commit is contained in:
dab246
2025-10-13 14:40:25 +07:00
committed by Dat H. Pham
parent 7d80557582
commit 51b85c8b79
12 changed files with 112 additions and 30 deletions
+20
View File
@@ -8,12 +8,14 @@ class OIDCConfiguration with EquatableMixin {
final String clientId;
final List<String> scopes;
final bool isTWP;
final String? loginHint;
OIDCConfiguration({
required this.authority,
required this.clientId,
required this.scopes,
this.isTWP = false,
this.loginHint,
});
String get discoveryUrl {
@@ -30,5 +32,23 @@ class OIDCConfiguration with EquatableMixin {
clientId,
scopes,
isTWP,
loginHint,
];
}
extension OIDCConfigurationExtension on OIDCConfiguration {
OIDCConfiguration copyWidth({
String? authority,
String? clientId,
List<String>? scopes,
bool? isTWP,
String? loginHint,
}) =>
OIDCConfiguration(
authority: authority ?? this.authority,
clientId: clientId ?? this.clientId,
scopes: scopes ?? this.scopes,
isTWP: isTWP ?? this.isTWP,
loginHint: loginHint ?? this.loginHint,
);
}