History

GSF.Security: Applied thread safe SecurityProviderCache ValidateCurrentProvider pattern to provider cache implementations.

J. Ritchie Carroll committed 10 years ago

Commit ffb9ca01 parent 46e24a09 files · +26 −59Browse files

Showing the changes to Source/Libraries/GSF.ServiceProcess (1 of 9 files). Show all

Unified · Split

Source/Libraries/GSF.ServiceProcess/ServiceHelper.cs+1−2
@@ -2289,8 +2289,7 @@ namespace GSF.ServiceProcess · 2288 unmodified lines
22892289 Thread.CurrentPrincipal = client.ClientUser;
22902290
22912291 // Retrieve previously initialized security provider of the remote client's user.
2292− if ((object)SecurityProviderCache.CurrentProvider == null)
2293− SecurityProviderCache.CurrentProvider = SecurityProviderUtility.CreateProvider(string.Empty);
2292+ SecurityProviderCache.ValidateCurrentProvider();
22942293
22952294 // Initialize security provider for the remote client's user from specified credentials.
22962295 if ((!Thread.CurrentPrincipal.Identity.IsAuthenticated || (object)client.ClientUser == null) && !string.IsNullOrEmpty(client.ClientUserCredentials))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t