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
297 {297 {
298 // Check if access to resource is to be secured.298 // Check if access to resource is to be secured.
299 string resource = GetResourceName();299 string resource = GetResourceName();
300
300 if (!IsAccessSecured(resource))301 if (!IsAccessSecured(resource))
301 return;302 return;
302 303
303 if (SecurityProviderCache.CurrentProvider == null)304 SecurityProviderCache.ValidateCurrentProvider();
304 SecurityProviderCache.CurrentProvider = SecurityProviderUtility.CreateProvider(string.Empty);
305 305
306 if (!m_application.User.Identity.IsAuthenticated)306 if (!m_application.User.Identity.IsAuthenticated)
307 // Failed to authenticate user.307 // 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