protected override void Initialize(HttpControllerContext controllerContext) { base.Initialize(controllerContext); if (User == null) { return; } var windowsIdentity = User.Identity as WindowsIdentity; if (windowsIdentity != null) { _gameDataProvider.InitializeSession(User.Identity.Name); return; } var claimsIdentity = User.Identity as ClaimsIdentity; if (claimsIdentity != null) { _gameDataProvider.InitializeGameContext(Guid.Parse(claimsIdentity.FindFirst("gameSession").Value)); } }