private void parseSessionContext()

in src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java [283:311]


    private void parseSessionContext(UserIdentity userIdentity) throws IOException {
        if (jsonParser.nextToken() != JsonToken.START_OBJECT) {
            throw new JsonParseException("Not a SessionContext object", jsonParser.getCurrentLocation());
        }

        SessionContext sessionContext = new SessionContext();

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

            switch (key) {
            case "attributes":
                sessionContext.add(CloudTrailEventField.attributes.name(), parseAttributes());
                break;
            case "sessionIssuer":
                sessionContext.add(CloudTrailEventField.sessionIssuer.name(), parseSessionIssuer(sessionContext));
                break;
            case "webIdFederationData":
                sessionContext.add(CloudTrailEventField.webIdFederationData.name(), parseWebIdentitySessionContext(sessionContext));
                break;
            default:
                sessionContext.add(key, parseDefaultValue(key));
                break;
            }
        }

        userIdentity.add(CloudTrailEventField.sessionContext.name(), sessionContext);

    }