Add branded default provider and enforced enrollment
This commit is contained in:
@@ -14,7 +14,9 @@ internal static class Program
|
||||
|
||||
private static readonly string[] ExpectedLabels =
|
||||
[
|
||||
"Universidad La Salle · Acceso SGU",
|
||||
"Acceso institucional SGU",
|
||||
"Universidad La Salle",
|
||||
"Acceso institucional SGU",
|
||||
"Usa tu clave institucional (DO, AL o AD + 6 dígitos) y contraseña.",
|
||||
"Clave institucional",
|
||||
@@ -55,6 +57,7 @@ internal static class Program
|
||||
|
||||
List<string> labels = [];
|
||||
bool providerLogoPresent = false;
|
||||
bool userTilePresent = false;
|
||||
for (uint index = 0; index < fieldCount; index++)
|
||||
{
|
||||
ThrowIfFailed(provider.GetFieldDescriptorAt(index, out IntPtr descriptorPointer), "GetFieldDescriptorAt");
|
||||
@@ -69,6 +72,8 @@ internal static class Program
|
||||
labels.Add(descriptor.Label ?? string.Empty);
|
||||
providerLogoPresent |= descriptor.FieldType == FieldType.TileImage &&
|
||||
descriptor.FieldTypeGuid == ProviderLogoFieldType;
|
||||
userTilePresent |= descriptor.FieldType == FieldType.TileImage &&
|
||||
descriptor.FieldTypeGuid == Guid.Empty;
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -87,6 +92,7 @@ internal static class Program
|
||||
credentialCount == 1 &&
|
||||
credential != IntPtr.Zero &&
|
||||
providerLogoPresent &&
|
||||
userTilePresent &&
|
||||
labels.SequenceEqual(ExpectedLabels, StringComparer.Ordinal);
|
||||
|
||||
if (mode != "enumeration" && passed)
|
||||
@@ -103,6 +109,7 @@ internal static class Program
|
||||
fieldCount,
|
||||
labels,
|
||||
providerLogoPresent,
|
||||
userTilePresent,
|
||||
credentialCount,
|
||||
defaultIndex,
|
||||
autoLogon = autoLogon != 0
|
||||
|
||||
Reference in New Issue
Block a user