Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MISP Changes #1058

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ public class MispLicenseData {
@Column(name = "misp_commence_on")
private LocalDateTime mispCommenceOn;

@NotNull
/*@NotNull
@Column(name = "misp_expires_on")
private LocalDateTime mispExpiresOn;
private LocalDateTime mispExpiresOn;*/

@NotNull
@Column(name = "misp_status")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public PartnerPolicyResponseDTO validateAndGetPolicy(String partnerId, String pa
if (Objects.nonNull(apiKeyData)) {
response.setApiKeyExpiresOn(apiKeyData.getApiKeyExpiresOn());
}
response.setMispExpiresOn(mispLicenseData.getMispExpiresOn());
//response.setMispExpiresOn(mispLicenseData.getMispExpiresOn());

String mispPolicyId = mispLicenseData.getPolicyId();
if (Objects.nonNull(mispPolicyId)) {
Expand Down Expand Up @@ -278,10 +278,10 @@ private void validatePartnerMappingDetails(Optional<PartnerMapping> partnerMappi
throw new IdAuthenticationBusinessException(IdAuthenticationErrorConstants.INVALID_LICENSEKEY.getErrorCode(),
IdAuthenticationErrorConstants.INVALID_LICENSEKEY.getErrorMessage());
}
if (mispLicenseData.getMispExpiresOn().isBefore(DateUtils.getUTCCurrentDateTime())) {
/*if (mispLicenseData.getMispExpiresOn().isBefore(DateUtils.getUTCCurrentDateTime())) {
throw new IdAuthenticationBusinessException(IdAuthenticationErrorConstants.LICENSEKEY_EXPIRED.getErrorCode(),
IdAuthenticationErrorConstants.LICENSEKEY_EXPIRED.getErrorMessage());
}
}*/
} else {
throw new IdAuthenticationBusinessException(IdAuthenticationErrorConstants.INVALID_LICENSEKEY.getErrorCode(),
IdAuthenticationErrorConstants.INVALID_LICENSEKEY.getErrorMessage());
Expand Down Expand Up @@ -471,7 +471,7 @@ public void updateMispLicenseData(EventModel eventModel) {
mispLicenseData.setMispId(mispLicenseEventData.getMispId());
mispLicenseData.setLicenseKey(mispLicenseEventData.getLicenseKey());
mispLicenseData.setMispCommenceOn(mispLicenseEventData.getMispCommenceOn());
mispLicenseData.setMispExpiresOn(mispLicenseEventData.getMispExpiresOn());
//mispLicenseData.setMispExpiresOn(mispLicenseEventData.getMispExpiresOn());
mispLicenseData.setMispStatus(mispLicenseEventData.getMispStatus());
mispLicenseData.setPolicyId(mispLicenseEventData.getPolicyId());
mispLicDataRepo.save(mispLicenseData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private PartnerPolicyResponseDTO getPolicyData() {
response.setPartnerId("12345678");
response.setPartnerName("Test");
response.setPolicyId("345678");
response.setMispExpiresOn(LocalDateTime.now().plus(Duration.ofMinutes(5)));
//response.setMispExpiresOn(LocalDateTime.now().plus(Duration.ofMinutes(5)));
response.setApiKeyExpiresOn(LocalDateTime.now().plus(Duration.ofMinutes(5)));
response.setPolicyExpiresOn(LocalDateTime.now().plus(Duration.ofMinutes(5)));
return response;
Expand Down
Loading