Skip to content

Commit

Permalink
Merge pull request #34 from eu-digital-green-certificates/fix/valid
Browse files Browse the repository at this point in the history
change accesstoken 'valid to' to 'arrival time'
  • Loading branch information
SchulzeStTSI authored Oct 22, 2021
2 parents c4fb47b + 0d24095 commit 29d3036
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ public AccessTokenPayload build(
accessTokenConditions.setDob(this.parseBirthDay(subjectResponse.getBirthDate()));

final OffsetDateTime departureTime = occurrenceInfo.getDepartureTime();
accessTokenConditions.setValidFrom(departureTime.format(FORMATTER));
accessTokenConditions.setValidationClock(occurrenceInfo.getArrivalTime().format(FORMATTER));
accessTokenConditions.setValidTo(departureTime.plusDays(2).format(FORMATTER));
final OffsetDateTime arrivalTime = occurrenceInfo.getArrivalTime();
accessTokenConditions.setValidFrom(departureTime.format(FORMATTER));
accessTokenConditions.setValidationClock(arrivalTime.format(FORMATTER));
accessTokenConditions.setValidTo(arrivalTime.format(FORMATTER));

final AccessTokenPayload accessTokenPayload = new AccessTokenPayload();
accessTokenPayload.setJti(subjectResponse.getJti());
Expand Down

0 comments on commit 29d3036

Please sign in to comment.