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.Web/SecurityModule.cs (1 of 9 files). Show all

Unified · Split

Source/Libraries/GSF.Web/SecurityModule.cs+2−2
@@ -297,11 +297,11 @@ namespace GSF.Web · 296 unmodified lines
297297 {
298298 // Check if access to resource is to be secured.
299299 string resource = GetResourceName();
300+
300301 if (!IsAccessSecured(resource))
301302 return;
302303
303− if (SecurityProviderCache.CurrentProvider == null)
304− SecurityProviderCache.CurrentProvider = SecurityProviderUtility.CreateProvider(string.Empty);
304+ SecurityProviderCache.ValidateCurrentProvider();
305305
306306 if (!m_application.User.Identity.IsAuthenticated)
307307 // Failed to authenticate user.

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