Skip to content

Commit

Permalink
add jti to passenger
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Schwarz committed Sep 20, 2021
1 parent 5d5e9ff commit bfa3b1a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ private void convertPassangers(final BookingEntity entity, final BookingResponse
passengerResponse.setLastname(passengerEntity.getLastname());
passengerResponse.setBirthDate(passengerEntity.getBirthDate());
passengerResponse.setServiceIdUsed(passengerEntity.getServiceIdUsed());
passengerResponse.setJti(passengerEntity.getJti());

final DccStatusEntity dccStatusEntity = passengerEntity.getDccStatus();
if (dccStatusEntity != null) {
Expand Down
15 changes: 9 additions & 6 deletions src/main/java/eu/europa/ec/dgc/booking/dto/BookingResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ public static final class BookingPassengerResponse {
private LocalDate birthDate;

private BookingPassengerDccStatusResponse dccStatus;

private String serviceIdUsed;

// AccessTokenPayload.jti
private String jti;
}

@Data
Expand Down Expand Up @@ -89,7 +92,7 @@ public static final class BookingFlightInfoResponse {
private String to;

private OffsetDateTime time;

@JsonProperty("coa")
private String countryOfArrival;

Expand All @@ -107,14 +110,14 @@ public static final class BookingFlightInfoResponse {

@JsonProperty("arrivalTime")
private OffsetDateTime arrivalTime;

private int type;

private List<String> categories;

@JsonProperty("lang")
private String language;

private List<String> conditionTypes;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,17 @@ public class PassengerEntity {

@Setter
private DccStatusEntity dccStatus;

// service id that was used for the token
@Setter
private String serviceIdUsed;

// AccessTokenPayload.jti
private String jti;

public PassengerEntity() {
this.id = UUID.randomUUID();
this.jti = UUID.randomUUID().toString();
}

/**
Expand Down

0 comments on commit bfa3b1a

Please sign in to comment.