Changeset 316 for binary-improvements/MapRendering/Web/OpenID.cs
- Timestamp:
- Apr 6, 2018, 3:30:17 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/OpenID.cs
r314 r316 14 14 public static class OpenID { 15 15 private const string STEAM_LOGIN = "https://steamcommunity.com/openid/login"; 16 private static Regex steamIdUrlMatcher = new Regex (@"^http :\/\/steamcommunity\.com\/openid\/id\/([0-9]{17,18})");16 private static Regex steamIdUrlMatcher = new Regex (@"^https?:\/\/steamcommunity\.com\/openid\/id\/([0-9]{17,18})"); 17 17 18 18 private static readonly X509Certificate2 caCert = new X509Certificate2 (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location) + "/steam-rootca.cer"); … … 111 111 112 112 public static ulong Validate (HttpListenerRequest _req) { 113 if (getValue (_req, "openid.mode") == "cancel") { 113 string mode = getValue (_req, "openid.mode"); 114 if (mode == "cancel") { 114 115 Log.Warning ("Steam OpenID login canceled"); 116 return 0; 117 } 118 if (mode == "error") { 119 Log.Warning ("Steam OpenID login error: " + getValue (_req, "openid.error")); 115 120 return 0; 116 121 }
Note:
See TracChangeset
for help on using the changeset viewer.