mirror of
https://github.com/neos-sdi/adfsmfa.git
synced 2025-10-26 11:19:59 +00:00
3.1.2112.0
3.1.2112.0
This commit is contained in:
parent
69687ddf43
commit
7a9d01545c
1
.gitignore
vendored
1
.gitignore
vendored
@ -329,3 +329,4 @@ ASALocalRun/
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
*.db
|
||||
|
||||
@ -1146,7 +1146,9 @@ namespace Neos.IdentityServer.MultiFactor.Administration
|
||||
public string Origin { get; set; }
|
||||
public bool DirectLogin { get; set; }
|
||||
public bool UseNickNames { get; set; }
|
||||
|
||||
public string ForbiddenBrowsers { get; set; }
|
||||
public string InitiatedBrowsers { get; set; }
|
||||
public string NoCounterBrowsers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Kind Property
|
||||
@ -1180,6 +1182,9 @@ namespace Neos.IdentityServer.MultiFactor.Administration
|
||||
this.PinRequirements = otp.PinRequirements;
|
||||
this.FullyQualifiedImplementation = otp.FullQualifiedImplementation;
|
||||
this.Parameters = otp.Parameters.Data;
|
||||
this.ForbiddenBrowsers = otp.Configuration.ForbiddenBrowsers;
|
||||
this.InitiatedBrowsers = otp.Configuration.InitiatedBrowsers;
|
||||
this.NoCounterBrowsers = otp.Configuration.NoCounterBrowsers;
|
||||
|
||||
this.Timeout = otp.Configuration.Timeout;
|
||||
this.TimestampDriftTolerance = otp.Configuration.TimestampDriftTolerance;
|
||||
@ -1210,6 +1215,9 @@ namespace Neos.IdentityServer.MultiFactor.Administration
|
||||
otp.UseNickNames = this.UseNickNames;
|
||||
otp.FullQualifiedImplementation = this.FullyQualifiedImplementation;
|
||||
otp.Parameters.Data = this.Parameters;
|
||||
otp.Configuration.ForbiddenBrowsers = ForbiddenBrowsers;
|
||||
otp.Configuration.InitiatedBrowsers = InitiatedBrowsers;
|
||||
otp.Configuration.NoCounterBrowsers = NoCounterBrowsers;
|
||||
|
||||
otp.Configuration.Timeout = this.Timeout;
|
||||
otp.Configuration.TimestampDriftTolerance = this.TimestampDriftTolerance;
|
||||
|
||||
@ -53,7 +53,7 @@ using System.Runtime.Versioning;
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
|
||||
@ -4012,32 +4012,27 @@ namespace Neos.IdentityServer.MultiFactor
|
||||
/// <summary>
|
||||
/// CheckForUserAgent method implementation
|
||||
/// </summary>
|
||||
internal static void CheckForUserAgent(MFAConfig config, AuthenticationContext usercontext, string userplatform)
|
||||
internal static void CheckForUserAgent(MFAConfig config, AuthenticationContext usercontext, string useragent)
|
||||
{
|
||||
string platform = userplatform;
|
||||
usercontext.Platform = userplatform;
|
||||
if (!string.IsNullOrEmpty(platform))
|
||||
usercontext.BrowserDetected = useragent;
|
||||
if (!string.IsNullOrEmpty(useragent))
|
||||
{
|
||||
if (platform.ToLower().Contains("safari"))
|
||||
{
|
||||
usercontext.DirectLogin = false;
|
||||
return;
|
||||
}
|
||||
if (platform.ToLower().Contains("trident/7.0") || platform.ToLower().Contains("msie"))
|
||||
if (CheckForbiddenBrowsers(config.WebAuthNProvider.Configuration, usercontext))
|
||||
{
|
||||
usercontext.BioNotSupported = true;
|
||||
usercontext.DirectLogin = false;
|
||||
return;
|
||||
}
|
||||
if (IsApplePlatForm(usercontext))
|
||||
if (CheckInitiatedBrowsers(config.WebAuthNProvider.Configuration, usercontext))
|
||||
{
|
||||
usercontext.BioNotSupported = false;
|
||||
usercontext.DirectLogin = false;
|
||||
return;
|
||||
}
|
||||
// else "Android", "Chrome OS", "Linux", "Windows", or "Unknown"
|
||||
}
|
||||
else
|
||||
{
|
||||
usercontext.BioNotSupported = false;
|
||||
usercontext.DirectLogin = false;
|
||||
return;
|
||||
}
|
||||
@ -4046,40 +4041,85 @@ namespace Neos.IdentityServer.MultiFactor
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// IsAppleDevice method implmentation
|
||||
/// BrowserDetection method implmentation
|
||||
/// Checking userAgent browser's value. userAgentData is not supported by many browsers
|
||||
/// </summary>
|
||||
internal static bool IsAppleDevice(AuthenticationContext usercontext)
|
||||
internal static string BrowserDetection(string useragent)
|
||||
{
|
||||
if (usercontext.Platform.ToLower().Contains("safari"))
|
||||
if (useragent.ToLower().IndexOf("firefox") > -1)
|
||||
return "Firefox";
|
||||
if (useragent.ToLower().IndexOf("samsungbrowser") > -1)
|
||||
return "Samsung";
|
||||
if (useragent.ToLower().IndexOf("cldc") > -1)
|
||||
return "Nokia";
|
||||
if ((useragent.ToLower().IndexOf("opera") > -1) || (useragent.ToUpper().IndexOf("OPR") > -1))
|
||||
return "Opera";
|
||||
if ((useragent.ToLower().IndexOf("trident") > -1) || (useragent.ToLower().IndexOf("msie") > -1) || (useragent.ToLower().IndexOf("windows phone") > -1))
|
||||
return "IE";
|
||||
if (useragent.ToLower().IndexOf("edge") > -1)
|
||||
return "EdgeLegacy";
|
||||
if (useragent.ToLower().IndexOf("edg") > -1)
|
||||
return "Edge";
|
||||
if (useragent.ToLower().IndexOf("chrome") > -1)
|
||||
return "Chrome";
|
||||
if (useragent.ToLower().IndexOf("safari") > -1)
|
||||
return "Safari";
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CheckForbiddenBrowsers method implmentation
|
||||
/// </summary>
|
||||
private static bool CheckForbiddenBrowsers(WebAuthNProviderConfig config, AuthenticationContext usercontext)
|
||||
{
|
||||
string[] data = config.ForbiddenBrowsers.Split(';');
|
||||
foreach (string s in data)
|
||||
{
|
||||
#if psysuck
|
||||
Log.WriteEntry("Detected Safari", EventLogEntryType.Warning, 101);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
if (IsApplePlatForm(usercontext))
|
||||
{
|
||||
#if psysuck
|
||||
Log.WriteEntry("Detected Apple Platform", EventLogEntryType.Warning, 101);
|
||||
#endif
|
||||
return true;
|
||||
string x = s.Trim();
|
||||
if (string.IsNullOrEmpty(x))
|
||||
continue;
|
||||
if (x.StartsWith("#"))
|
||||
continue;
|
||||
if (usercontext.BrowserDetected.ToLower().Equals(x.ToLower()))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// IsApplePlatForm method implmentation
|
||||
/// CheckInitiatedBrowsers method implementation
|
||||
/// </summary>
|
||||
private static bool IsApplePlatForm(AuthenticationContext usercontext)
|
||||
private static bool CheckInitiatedBrowsers(WebAuthNProviderConfig config, AuthenticationContext usercontext)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(usercontext.Platform))
|
||||
string[] data = config.InitiatedBrowsers.Split(';');
|
||||
foreach (string s in data)
|
||||
{
|
||||
if (usercontext.Platform.ToLower().Equals("ios") || usercontext.Platform.ToLower().Equals("macos") || usercontext.Platform.ToLower().Equals("osx"))
|
||||
string x = s.Trim();
|
||||
if (string.IsNullOrEmpty(x))
|
||||
continue;
|
||||
if (x.StartsWith("#"))
|
||||
continue;
|
||||
if (usercontext.BrowserDetected.ToLower().Equals(x.ToLower()))
|
||||
return true;
|
||||
if (usercontext.Platform.ToLower().Contains("macintosh") || usercontext.Platform.ToLower().Contains("iphone") || usercontext.Platform.ToLower().Contains("ipad") || usercontext.Platform.ToLower().Contains("ipod"))
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// IsNoCounterDevice method implmentation
|
||||
/// </summary>
|
||||
internal static bool IsNoCounterDevice(WebAuthNProviderConfig config, AuthenticationContext usercontext)
|
||||
{
|
||||
string[] data = config.NoCounterBrowsers.Split(';');
|
||||
foreach (string s in data)
|
||||
{
|
||||
string x = s.Trim();
|
||||
if (string.IsNullOrEmpty(x))
|
||||
continue;
|
||||
if (x.StartsWith("#"))
|
||||
continue;
|
||||
if (usercontext.BrowserDetected.ToLower().Equals(x.ToLower()))
|
||||
return true;
|
||||
if (usercontext.Platform.ToLower().Equals("mac os x") || usercontext.Platform.ToLower().Equals("macintel") || usercontext.Platform.ToLower().Equals("mac_powerpc") || usercontext.Platform.ToLower().Equals("mac_68k"))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ using System.Runtime.Versioning;
|
||||
// en utilisant '*', comme ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
|
||||
Binary file not shown.
@ -52,7 +52,7 @@ using System.Runtime.Versioning;
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
|
||||
@ -49,4 +49,4 @@ using System.Runtime.InteropServices;
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
|
||||
@ -2186,6 +2186,21 @@ namespace MFA
|
||||
/// </summary>
|
||||
public bool UseNickNames { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <para type = "description" > Browsers can't use biometric authentication (eg: IE).</para>
|
||||
/// </summary>
|
||||
public string ForbiddenBrowsers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <para type = "description" > Operating Systems that can use biometric authentication with user initiated action (eg: Safari for TouchID and FaceID).</para>
|
||||
/// </summary>
|
||||
public string InitiatedBrowsers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <para type = "description" > Browsers that require that the counter is always 0 (eg: Safari for TouchID and FaceID).</para>
|
||||
/// </summary>
|
||||
public string NoCounterBrowsers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// explicit operator from PSConfigBiometricProvider
|
||||
/// </summary>
|
||||
@ -2207,6 +2222,10 @@ namespace MFA
|
||||
UseNickNames = otp.UseNickNames,
|
||||
FullQualifiedImplementation = otp.FullyQualifiedImplementation,
|
||||
Parameters = otp.Parameters,
|
||||
ForbiddenBrowsers = otp.ForbiddenBrowsers,
|
||||
InitiatedBrowsers = otp.InitiatedBrowsers,
|
||||
NoCounterBrowsers = otp.NoCounterBrowsers,
|
||||
|
||||
Timeout = otp.Timeout,
|
||||
TimestampDriftTolerance = otp.TimestampDriftTolerance,
|
||||
ChallengeSize = otp.ChallengeSize,
|
||||
@ -2240,6 +2259,9 @@ namespace MFA
|
||||
UseNickNames = otp.UseNickNames,
|
||||
FullyQualifiedImplementation = otp.FullQualifiedImplementation,
|
||||
Parameters = otp.Parameters,
|
||||
ForbiddenBrowsers = otp.ForbiddenBrowsers,
|
||||
InitiatedBrowsers = otp.InitiatedBrowsers,
|
||||
NoCounterBrowsers = otp.NoCounterBrowsers,
|
||||
|
||||
Timeout = otp.Timeout,
|
||||
TimestampDriftTolerance = otp.TimestampDriftTolerance,
|
||||
|
||||
@ -53,7 +53,7 @@ using System.Runtime.Versioning;
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
|
||||
@ -1143,24 +1143,24 @@ namespace Neos.IdentityServer.MultiFactor
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Platform
|
||||
/// BrowserDetected
|
||||
/// </summary>
|
||||
[DataMember(Name = "Platform")]
|
||||
public string Platform
|
||||
[DataMember(Name = "BrowserDetected")]
|
||||
public string BrowserDetected
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_context.Data.ContainsKey("_authctxplatform") && _context.Data["_authctxplatform"] != null)
|
||||
return _context.Data["_authctxplatform"].ToString();
|
||||
if (_context.Data.ContainsKey("_authctxbrowser") && _context.Data["_authctxbrowser"] != null)
|
||||
return _context.Data["_authctxbrowser"].ToString();
|
||||
else
|
||||
return string.Empty;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_context.Data.ContainsKey("_authctxplatform"))
|
||||
_context.Data["_authctxplatform"] = value;
|
||||
if (_context.Data.ContainsKey("_authctxbrowser"))
|
||||
_context.Data["_authctxbrowser"] = value;
|
||||
else
|
||||
_context.Data.Add("_authctxplatform", value);
|
||||
_context.Data.Add("_authctxbrowser", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1856,6 +1856,16 @@ namespace Neos.IdentityServer.MultiFactor
|
||||
_origin = value;
|
||||
}
|
||||
}
|
||||
|
||||
[XmlAttribute("ForbiddenBrowsers")]
|
||||
public string ForbiddenBrowsers { get; set; } = "ie;samsung;nokia";
|
||||
|
||||
[XmlAttribute("InitiatedBrowsers")]
|
||||
public string InitiatedBrowsers { get; set; } = "safari;unknown";
|
||||
|
||||
[XmlAttribute("NoCounterBrowsers")]
|
||||
public string NoCounterBrowsers { get; set; } = "safari;unknown";
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -256,6 +256,8 @@ namespace Neos.IdentityServer.MultiFactor
|
||||
string ServerName { get; set; }
|
||||
string ServerIcon { get; set; }
|
||||
string Origin { get; set; }
|
||||
string ForbiddenBrowsers { get; set; }
|
||||
string InitiatedBrowsers { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -50,7 +50,7 @@ using System.Runtime.Versioning;
|
||||
// Révision
|
||||
//
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ using System.Runtime.Versioning;
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ using System.Runtime.Versioning;
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ using System.Runtime.Versioning;
|
||||
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ using System.Runtime.InteropServices;
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
|
||||
@ -34,5 +34,5 @@ using System.Runtime.InteropServices;
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
@ -34,5 +34,5 @@ using System.Runtime.InteropServices;
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
@ -42,6 +42,11 @@ namespace Neos.IdentityServer.MultiFactor.WebAuthN
|
||||
public MFAConfig Config { get; set; }
|
||||
public bool DirectLogin { get; private set; }
|
||||
public int ChallengeSize { get; private set; }
|
||||
public string ForbiddenBrowsers { get; private set; }
|
||||
public string ForbiddenOperatingSystems { get; private set; }
|
||||
public string InitiatedBrowsers { get; private set; }
|
||||
public string InitiatedOperatingSystems { get; private set; }
|
||||
public string NoCounterBrowsers { get; private set; }
|
||||
public string ConveyancePreference { get; private set; }
|
||||
public string Attachement { get; private set; }
|
||||
public bool Extentions { get; private set; }
|
||||
@ -395,6 +400,9 @@ namespace Neos.IdentityServer.MultiFactor.WebAuthN
|
||||
UserVerificationRequirement = param.Options.UserVerificationRequirement.ToEnum<UserVerificationRequirement>();
|
||||
RequireResidentKey = param.Options.RequireResidentKey;
|
||||
ChallengeSize = param.Configuration.ChallengeSize;
|
||||
ForbiddenBrowsers = param.Configuration.ForbiddenBrowsers;
|
||||
InitiatedBrowsers = param.Configuration.InitiatedBrowsers;
|
||||
NoCounterBrowsers = param.Configuration.NoCounterBrowsers;
|
||||
Fido2Configuration fido = new Fido2Configuration()
|
||||
{
|
||||
ServerDomain = param.Configuration.ServerDomain,
|
||||
@ -823,14 +831,13 @@ namespace Neos.IdentityServer.MultiFactor.WebAuthN
|
||||
throw new Exception("Unknown credentials");
|
||||
}
|
||||
|
||||
// Check Replay
|
||||
AuthenticatorData authData = new AuthenticatorData(clientResponse.Response.AuthenticatorData);
|
||||
|
||||
bool isapple = Utilities.IsAppleDevice(ctx);
|
||||
bool isnocount = Utilities.IsNoCounterDevice(this.Config.WebAuthNProvider.Configuration, ctx);
|
||||
uint authCounter = 0;
|
||||
uint storedCounter = 0;
|
||||
|
||||
if (!isapple)
|
||||
if (!isnocount)
|
||||
{
|
||||
authCounter = authData.SignCount;
|
||||
storedCounter = creds.SignatureCounter;
|
||||
@ -851,12 +858,10 @@ namespace Neos.IdentityServer.MultiFactor.WebAuthN
|
||||
|
||||
// Apple counter always 0
|
||||
AssertionVerificationResult res = _webathn.SetAssertionResult(clientResponse, options, creds.PublicKey, storedCounter, callback).Result;
|
||||
if (!isapple)
|
||||
if (!isnocount)
|
||||
RuntimeRepository.UpdateCounter(Config, user, res.CredentialId, res.Counter);
|
||||
else
|
||||
{
|
||||
RuntimeRepository.UpdateCounter(Config, user, res.CredentialId, 0);
|
||||
}
|
||||
|
||||
if (!authData.UserPresent || !authData.UserVerified)
|
||||
{
|
||||
@ -917,7 +922,7 @@ namespace Neos.IdentityServer.MultiFactor.WebAuthN
|
||||
return (int)AuthenticationResponseKind.Error;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -34,6 +34,6 @@ using System.Runtime.InteropServices;
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
|
||||
<Product Id="a23dd485-5365-4d82-8309-103494000001" Name="MFA Provider for ADFS 2022/2019/2016/2012 R2" Language="1033" Version="3.1.2111.1" Manufacturer="Neos-sdi" UpgradeCode="a23dd485-5365-4d82-8309-103495000001" >
|
||||
<Product Id="a23dd485-5365-4d82-8309-103494000001" Name="MFA Provider for ADFS 2022/2019/2016/2012 R2" Language="1033" Version="3.1.2112.0" Manufacturer="Neos-sdi" UpgradeCode="a23dd485-5365-4d82-8309-103495000001" >
|
||||
|
||||
<Package InstallerVersion="500" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated" Platform="x64" Description="Multi-Factor Authentication for ADFS 2022/2019/2016/2012R2" />
|
||||
|
||||
|
||||
@ -670,6 +670,7 @@ namespace Neos.IdentityServer.MultiFactor
|
||||
_holders.Add(new PlaceHolders() { TagName = "##MANAGEACCOUNT##", FiledName = "manageaccount" });
|
||||
_holders.Add(new PlaceHolders() { TagName = "##OPTIONITEM##", FiledName = "optionitem" });
|
||||
_holders.Add(new PlaceHolders() { TagName = "##PLATFORM##", FiledName = "userplatform" });
|
||||
_holders.Add(new PlaceHolders() { TagName = "##AGENT##", FiledName = "useragent" });
|
||||
_holders.Add(new PlaceHolders() { TagName = "##LANGUAGE##", FiledName = "userlanguage" });
|
||||
}
|
||||
}
|
||||
@ -1261,7 +1262,7 @@ namespace Neos.IdentityServer.MultiFactor
|
||||
|
||||
result += "<input id=\"context\" type=\"hidden\" name=\"Context\" value=\"%Context%\"/>" + CR;
|
||||
result += "<input id=\"authMethod\" type=\"hidden\" name=\"AuthMethod\" value=\"%AuthMethod%\"/>" + CR;
|
||||
result += "<input id=\"##PLATFORM##\" type=\"hidden\" name=\"##PLATFORM##\" />" + CR;
|
||||
result += "<input id=\"##AGENT##\" type=\"hidden\" name=\"##AGENT##\" />" + CR;
|
||||
result += "<input id=\"##LANGUAGE##\" type=\"hidden\" name=\"##LANGUAGE##\" />" + CR;
|
||||
result += "</form>" + CR;
|
||||
return result;
|
||||
@ -1273,27 +1274,17 @@ namespace Neos.IdentityServer.MultiFactor
|
||||
string result = "<script type='text/javascript'>" + CR;
|
||||
result += "function QueryUserSessionProperties(frm)" + CR;
|
||||
result += "{" + CR;
|
||||
result += " var xplatform = document.getElementById('userplatform');" + CR;
|
||||
result += " try" + CR;
|
||||
result += " {" + CR;
|
||||
result += " if (xplatform)" + CR;
|
||||
result += " var xagent = document.getElementById('useragent');" + CR;
|
||||
result += " if (xagent)" + CR;
|
||||
result += " {" + CR;
|
||||
result += " xplatform.value = navigator.userAgentData.platform;" + CR;
|
||||
result += " xagent.value = navigator.userAgent;" + CR;
|
||||
result += " }" + CR;
|
||||
result += " }" + CR;
|
||||
result += " catch(e)" + CR;
|
||||
result += " {" + CR;
|
||||
result += " try" + CR;
|
||||
result += " {" + CR;
|
||||
result += " if (xplatform)" + CR;
|
||||
result += " {" + CR;
|
||||
result += " xplatform.value = navigator.userAgent;" + CR;
|
||||
result += " }" + CR;
|
||||
result += " }" + CR;
|
||||
result += " catch(e)" + CR;
|
||||
result += " {" + CR;
|
||||
result += " xplatform.value = null;" + CR;
|
||||
result += " }" + CR;
|
||||
result += " xagent.value = null;" + CR;
|
||||
result += " }" + CR;
|
||||
|
||||
result += " try" + CR;
|
||||
|
||||
@ -405,11 +405,11 @@ namespace Neos.IdentityServer.MultiFactor
|
||||
case ProviderPageMode.ManageOptions: // Manage Options
|
||||
usercontext.WizContext = WizardContextMode.ManageOptions;
|
||||
result = TryManageOptions(usercontext, context, proofData, request, out claims);
|
||||
Utilities.CheckForUserAgent(Config, usercontext, usercontext.Platform);
|
||||
Utilities.CheckForUserAgent(Config, usercontext, usercontext.BrowserDetected);
|
||||
break;
|
||||
case ProviderPageMode.SelectOptions:
|
||||
result = TrySelectOptions(usercontext, context, proofData, request, out claims);
|
||||
Utilities.CheckForUserAgent(Config, usercontext, usercontext.Platform);
|
||||
Utilities.CheckForUserAgent(Config, usercontext, usercontext.BrowserDetected);
|
||||
break;
|
||||
case ProviderPageMode.ChooseMethod:
|
||||
result = TryChooseMethod(usercontext, context, proofData, request, out claims);
|
||||
@ -471,9 +471,6 @@ namespace Neos.IdentityServer.MultiFactor
|
||||
claims = null;
|
||||
IAdapterPresentation result = null;
|
||||
|
||||
string userplatfrom = proofData.Properties["userplatform"]?.ToString();
|
||||
if (string.IsNullOrEmpty(userplatfrom))
|
||||
userplatfrom = request.UserAgent;
|
||||
string userlanguage = proofData.Properties["userlanguage"]?.ToString();
|
||||
string[] userlanguages = null;
|
||||
if (string.IsNullOrEmpty(userlanguage))
|
||||
@ -481,7 +478,10 @@ namespace Neos.IdentityServer.MultiFactor
|
||||
else
|
||||
userlanguages = new string[] { userlanguage };
|
||||
Utilities.PatchLanguageIfNeeded(Config, usercontext, userlanguages);
|
||||
Utilities.CheckForUserAgent(Config, usercontext, userplatfrom);
|
||||
|
||||
string useragent = proofData.Properties["useragent"]?.ToString();
|
||||
Utilities.CheckForUserAgent(Config, usercontext, Utilities.BrowserDetection(useragent));
|
||||
|
||||
usercontext.UIMode = GetAuthenticationContextRequest(usercontext);
|
||||
GetAuthenticationData(usercontext);
|
||||
result = new AdapterPresentation(this, context);
|
||||
|
||||
@ -52,7 +52,7 @@ using System.Runtime.Versioning;
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ using System.Runtime.Versioning;
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
|
||||
@ -35,6 +35,6 @@ using System.Runtime.Versioning;
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
@ -50,7 +50,7 @@ using System.Runtime.Versioning;
|
||||
// Révision
|
||||
//
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ using System.Windows;
|
||||
[assembly: Guid("46f0d5b0-3954-4f7e-94dc-4d2757f22441")]
|
||||
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.2111.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.2112.0")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ This extension works with Active Directory or an SQL Server Database for storing
|
||||
## Downloads
|
||||
- <https://github.com/neos-sdi/adfsmfa/releases>
|
||||
|
||||
- <https://github.com/neos-sdi/adfsmfa/releases/download/3.1/adfsmfa.3.1.2111.1.msi>
|
||||
- <https://github.com/neos-sdi/adfsmfa/releases/download/3.1/adfsmfa.3.1.2112.0.msi>
|
||||
|
||||
## Building Solution
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user