public void RemoveAuthToken(string token) { if (_tokenCache.ContainsKey(token)) { _tokenCache.Remove(token); } else { BusinessErrors.Add(new BusinessErrorSM(BusinessErrorCodes.DataNotFound, "Token not found")); } }
public void AddAuthToken(AuthTokenSM authToken) { if (_tokenCache.ContainsKey(authToken.Token)) { BusinessErrors.Add(new BusinessErrorSM(BusinessErrorCodes.DataAlreadyExists, "Token already exists")); } else { _tokenCache.Add(authToken.Token, authToken.Expiry); } }