Parses the {@link UserIdentity} in CloudTrailEventData

@param eventData {@link CloudTrailEventData} needs to parse.
@throws IOException
552408
private void parseUserIdentity(CloudTrailEventData eventData) throws IOException {
        JsonToken nextToken = jsonParser.nextToken();
        if (nextToken == JsonToken.VALUE_NULL) {
            eventData.add(CloudTrailEventField.userIdentity.name(), null);
            return;
        }

        if (nextToken != JsonToken.START_OBJECT) {
            throw new JsonParseException("Not a UserIdentity object", jsonParser.getCurrentLocation());
        }

        UserIdentity userIdentity = new UserIdentity();

        while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
            String key = jsonParser.getCurrentName();

            switch (key) {
            case "type":
                userIdentity.add(CloudTrailEventField.type.name(), jsonParser.nextTextValue());
                break;
            case "principalId":
                userIdentity.add(CloudTrailEventField.principalId.name(), jsonParser.nextTextValue());
                break;
            case "arn":
                userIdentity.add(CloudTrailEventField.arn.name(), jsonParser.nextTextValue());
                break;
            case "accountId":
                userIdentity.add(CloudTrailEventField.accountId.name(), jsonParser.nextTextValue());
                break;
            case "accessKeyId":
                userIdentity.add(CloudTrailEventField.accessKeyId.name(), jsonParser.nextTextValue());
                break;
            case "userName":
                userIdentity.add(CloudTrailEventField.userName.name(), jsonParser.nextTextValue());
                break;
            case "sessionContext":
                this.parseSessionContext(userIdentity);
                break;
            case "invokedBy":
                userIdentity.add(CloudTrailEventField.invokedBy.name(), jsonParser.nextTextValue());
                break;
            case "identityProvider":
                userIdentity.add(CloudTrailEventField.identityProvider.name(), jsonParser.nextTextValue());
                break;
            default:
                userIdentity.add(key, parseDefaultValue(key));
                break;
            }
        }
        eventData.add(CloudTrailEventField.userIdentity.name(), userIdentity);
    }
98759
public void login(Object userIdentifier) {
        session().put(config().sessionKeyUsername(), userIdentifier);
        app().eventBus().trigger(new LoginEvent(userIdentifier.toString()));
    }
1328148
@Override
    public final EventData convert(final CommonEvent commonEvent) {

        // User's data
        final String dataType = commonEvent.getDataType().asBaseType();
        final SerializedDataType serUserDataType = new SerializedDataType(dataType);
        final Serializer userDataSerializer = serRegistry.getSerializer(serUserDataType);
        final byte[] serUserData = userDataSerializer.marshal(commonEvent.getData(), serUserDataType);
        final byte[] serData;
        if (userDataSerializer.getMimeType().matchEncoding(targetContentType)) {
            serData = serUserData;
        } else {
            final Base64Data base64data = new Base64Data(serUserData);
            final Serializer base64Serializer = serRegistry.getSerializer(Base64Data.SER_TYPE);
            serData = base64Serializer.marshal(base64data, Base64Data.SER_TYPE);
        }

        // EscMeta
        final EscMeta escMeta = EscSpiUtils.createEscMeta(serRegistry, targetContentType, commonEvent);
        final SerializedDataType escMetaType = new SerializedDataType(EscMeta.TYPE.asBaseType());
        final Serializer escMetaSerializer = getSerializer(escMetaType);
        final byte[] escSerMeta = escMetaSerializer.marshal(escMeta, escMetaType);

        // Create event data
        final EventData.Builder builder = EventData.newBuilder().eventId(commonEvent.getId().asBaseType())
                .type(dataType);
        if (targetContentType.isJson()) {
            builder.jsonData(serData);
            builder.jsonMetadata(escSerMeta);
        } else {
            builder.data(serData);
            builder.metadata(escSerMeta);
        }
        return builder.build();

    }
10064
public FireableEventType getEventId(EventLookupFacility eventLookupFacility,
			Response response) {

		String statusCodeName = null;
		final int responseStatus = response.getStatusCode();
		if (responseStatus == 100) {
			statusCodeName = "TRYING";
		} else if (100 < responseStatus && responseStatus < 200) {
			statusCodeName = "PROVISIONAL";
		} else if (responseStatus < 300) {
			statusCodeName = "SUCCESS";
		} else if (responseStatus < 400) {
			statusCodeName = "REDIRECT";
		} else if (responseStatus < 500) {
			statusCodeName = "CLIENT_ERROR";
		} else if (responseStatus < 600) {
			statusCodeName = "SERVER_ERROR";
		} else {
			statusCodeName = "GLOBAL_FAILURE";
		}

		// in dialog responses use the 1.1 event id prefix
		return getEventId(eventLookupFacility, new StringBuilder(RESPONSE_EVENT_PREFIX).append(statusCodeName).toString());
	}
778702
private boolean isProfilingHeader(final String confidentialData, final ILoggingEvent event) {
        if (!LOGGING_FILTER_NAME.equals(event.getLoggerName())) {
            return false;
        }

        for (final ProfilingFeatureType profileType : ProfilingFeatureType.values()) {
            // See ProfilingDataItem#getKey
            if (confidentialData.startsWith("\"" + profileType.name() + ":")) {
                return true;
            }
        }
        return false;
    }
923231
@Override
    public void inValidStreamId(org.mobicents.protocols.api.PayloadData payloadData) {
        logger.error(String
                .format("Tx : PayloadData with streamNumber=%d which is greater than or equal to maxSequenceNumber=%d. Droping PayloadData=%s",
                        payloadData.getStreamNumber(), this.maxOutboundStreams, payloadData));
    }
108876
public void userIdentifierInvalid(final String userId) {
		this.addStatusMessage(
				ProtocolConstants.StatusCodes.Create.User.USER_EXISTING,
				"there is already a user with the identifier \""
						+ userId
						+ "\" existing. Please provide a valid user identifier.");
	}
1289785
public void identity_user_user_DELETE(String user) throws IOException {
		String qPath = "/me/identity/user/{user}";
		StringBuilder sb = path(qPath, user);
		exec(qPath, "DELETE", sb.toString(), null);
	}
331818
@Override
    public CloudTrailEventMetadata getMetadata(int charStart, int charEnd) {
        // Use Jackson getTokenLocation API only return the , (Comma) position, we need to advance to first open curly brace.
        String rawEvent = logFile.substring(charStart, charEnd+1);
        int offset = rawEvent.indexOf("{");
        rawEvent = rawEvent.substring(offset);
        CloudTrailEventMetadata metadata = new LogDeliveryInfo(ctLog, charStart + offset, charEnd, rawEvent);
        return metadata;
    }
625081
public void dispatch_event(final EventData eventData) {
		final TangoQualityChange tangoQualityChange = this;
        if (EventUtil.graphicAvailable()) {
            //   Causes doRun.run() to be executed asynchronously
            //      on the AWT event dispatching thread.
            Runnable do_work_later = new Runnable() {
                public void run() {
                    fireTangoQualityChangeEvent(tangoQualityChange, eventData);
                }
            };
            SwingUtilities.invokeLater(do_work_later);
        }
        else
            fireTangoQualityChangeEvent(tangoQualityChange, eventData);
}
651671
private function addWhereSecurityIdentitiesForSharing(GetFilterEvent $event, ClassMetadata $meta)
    {
        $where = '';
        $mapSids = (array) $event->getRealParameter('map_security_identities');
        $mapSids = !empty($mapSids) ? $mapSids : ['_without_security_identity' => 'null'];
        $connection = $event->getConnection();

        foreach ($mapSids as $type => $stringIds) {
            $where .= '' === $where ? '' : ' OR ';
            $where .= sprintf(
                '(s.%s = %s AND s.%s IN (%s))',
                $meta->getColumnName('identityClass'),
                $connection->quote($type),
                $meta->getColumnName('identityName'),
                $stringIds
            );
        }

        return $where;
    }
576504
public void identity_user_user_PUT(String user, String description, String email, String group) throws IOException {
		String qPath = "/me/identity/user/{user}";
		StringBuilder sb = path(qPath, user);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "description", description);
		addBody(o, "email", email);
		addBody(o, "group", group);
		exec(qPath, "PUT", sb.toString(), o);
	}
1016809
private ResponseEntity<String> executeRequest(final TelemetryEventData eventData) {
        final HttpHeaders headers = new HttpHeaders();

        headers.add(HttpHeaders.CONTENT_TYPE, APPLICATION_JSON.toString());

        try {
            final RestTemplate restTemplate = new RestTemplate();
            final HttpEntity<String> body = new HttpEntity<>(MAPPER.writeValueAsString(eventData), headers);

            return restTemplate.exchange(TELEMETRY_TARGET_URL, HttpMethod.POST, body, String.class);
        } catch (JsonProcessingException | HttpClientErrorException ignore) {
            log.warn("Failed to exchange telemetry request, {}.", ignore.getMessage());
        }

        return null;
    }
594097
function(eventData) {
    initialResolve = true;
    // Cancel no event timer.
    if (noEventTimer) {
      noEventTimer.cancel();
    }
    // Incoming link detected.
    // Check for any stored partial event.
    self.getPartialStoredEvent_().then(function(event) {
      // Initialize to an unknown event.
      var authEvent = noEvent;
      // Confirm OAuth response included.
      if (event && eventData && eventData['url']) {
        // Construct complete event. Default to unknown event if none found.
        authEvent = self.extractAuthEventFromUrl_(event, eventData['url']) ||
            noEvent;
      }
      // Dispatch Auth event.
      self.dispatchEvent_(authEvent);
    });
  }
949877
private static Node checkUserIdentifier(final HttpServletRequest request,
			final ReadResponse response) {
		final String userId = request
				.getParameter(ProtocolConstants.Parameters.Read.USER_IDENTIFIER);
		if (userId != null) {
			final Node user = NeoUtils.getUserByIdentifier(userId);
			if (user != null) {
				return user;
			}
			response.userIdentifierInvalid(userId);
		} else {
			response.userIdentifierMissing();
		}

		return null;
	}
20383
private void parseResources(CloudTrailEventData eventData) throws IOException {
        JsonToken nextToken = jsonParser.nextToken();
        if (nextToken == JsonToken.VALUE_NULL) {
            eventData.add(CloudTrailEventField.resources.name(), null);
            return;
        }

        if (nextToken != JsonToken.START_ARRAY) {
            throw new JsonParseException("Not a list of resources object", jsonParser.getCurrentLocation());
        }

        List<Resource> resources = new ArrayList<Resource>();

        while (jsonParser.nextToken() != JsonToken.END_ARRAY) {
            resources.add(parseResource());
        }

        eventData.add(CloudTrailEventField.resources.name(), resources);
    }
908221
@Override
    public boolean filterEvent(CloudTrailEvent event) throws CallbackException {
        CloudTrailEventData eventData = event.getEventData();

        String eventSource = eventData.getEventSource();
        String eventName = eventData.getEventName();

        return eventSource.equals(EC2_EVENTS) && eventName.startsWith("Delete");
    }