ClearCanvas.Web.Enterprise.Authentication.LoginService.VerifySession C# (CSharp) Method

VerifySession() private method

private VerifySession ( string tokenId, bool bypassCache = false ) : ClearCanvas.Web.Enterprise.Authentication.SessionInfo
tokenId string
bypassCache bool
return ClearCanvas.Web.Enterprise.Authentication.SessionInfo
		public SessionInfo VerifySession(string tokenId, bool bypassCache = false)
		{
			try
			{
				if (bypassCache)
				{
					using (new ResponseCacheBypassScope())
					{
						return DoRenewSession(tokenId, true);
					}
				}
				return DoRenewSession(tokenId, true);
			}
			catch (FaultException<InvalidUserSessionException> ex)
			{
				SessionCache.Instance.RemoveSession(tokenId);
				throw new SessionValidationException(ex.Detail);
			}
			catch (FaultException<UserAccessDeniedException> ex)
			{
				SessionCache.Instance.RemoveSession(tokenId);
				throw new SessionValidationException(ex.Detail);
			}
			catch (Exception ex)
			{
				//TODO: for now we can't distinguish communicate errors and credential validation errors.
                // All exceptions are treated the same: we can't verify the session.
				var e = new SessionValidationException(ex);
				throw e;
			}
		}