Skip to content

Commit

Permalink
fix: use seconds from epoch in AssertionVerifierServiceImpl
Browse files Browse the repository at this point in the history
  • Loading branch information
pp-ps committed Jan 10, 2025
1 parent 074ebef commit 2a40560
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repositories {
}

allprojects {
version = '1.0.0-RC6'
version = '1.0.0-RC7-hotfix'
group = 'it.pagopa.tech.lollipop-consumer-java-sdk'
sourceCompatibility = '11'
targetCompatibility = '11'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ protected List<IdpCertData> getIdpCertData(Document assertionDoc)
ErrorRetrievingIdpCertDataException.ErrorCode.ENTITY_ID_FIELD_NOT_FOUND,
"Missing entity id field in the retrieved saml assertion");
}
instant = parseInstantToMillis(instant);
instant = parseInstantToUnixTimestamp(instant);
try {
entityId = entityId.trim();
List<IdpCertData> idpCertData = idpCertProvider.getIdpCertData(instant, entityId);
Expand Down Expand Up @@ -436,11 +436,11 @@ private String getPublicKey(String publicKey) {
return publicKey;
}

private String parseInstantToMillis(String instant) {
private String parseInstantToUnixTimestamp(String instant) {
try {
instant =
Long.toString(
ISODateTimeFormat.dateTimeParser().parseDateTime(instant).getMillis());
ISODateTimeFormat.dateTimeParser().parseDateTime(instant).getMillis() / 1000);
} catch (UnsupportedOperationException | IllegalArgumentException e) {
String msg =
String.format(
Expand Down

0 comments on commit 2a40560

Please sign in to comment.