Changeset 440 for TFP-WebServer/WebServer/src/Permissions/AdminApiTokens.cs
- Timestamp:
- May 24, 2023, 4:53:49 PM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TFP-WebServer/WebServer/src/Permissions/AdminApiTokens.cs
r404 r440 117 117 } 118 118 119 if (IsCommandlineToken (_name, _secret)) { 120 return 0; 121 } 122 119 123 return int.MaxValue; 124 } 125 126 private bool commandlineChecked; 127 private string commandlineTokenName; 128 private string commandlineTokenSecret; 129 130 private bool IsCommandlineToken (string _name, string _secret) { 131 if (!commandlineChecked) { 132 commandlineTokenName = GameUtils.GetLaunchArgument ("webapitokenname"); 133 commandlineTokenSecret = GameUtils.GetLaunchArgument ("webapitokensecret"); 134 135 commandlineChecked = true; 136 } 137 138 if (string.IsNullOrEmpty (commandlineTokenName) || string.IsNullOrEmpty (commandlineTokenSecret)) { 139 return false; 140 } 141 142 return _name == commandlineTokenName && _secret == commandlineTokenSecret; 120 143 } 121 144
Note:
See TracChangeset
for help on using the changeset viewer.