Skip to content

Commit

Permalink
[INJIVER-587] - rename package
Browse files Browse the repository at this point in the history
Signed-off-by: Sreenadh S <[email protected]>
  • Loading branch information
sree96 committed Dec 11, 2024
1 parent 2400a58 commit 5a7bbc6
Show file tree
Hide file tree
Showing 57 changed files with 189 additions and 190 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice;
package io.inji.verify;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.inji.verify.verifyservice.controller;
package io.inji.verify.controller;

import io.inji.verify.verifyservice.dto.verification.VerificationStatusDto;
import io.inji.verify.verifyservice.spi.CredentialVerificationService;
import io.inji.verify.dto.verification.VerificationStatusDto;
import io.inji.verify.spi.CredentialVerificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.inji.verify.verifyservice.controller;
package io.inji.verify.controller;

import io.inji.verify.verifyservice.dto.presentation.PresentationDefinitionDto;
import io.inji.verify.verifyservice.spi.PresentationDefinitionService;
import io.inji.verify.dto.presentation.PresentationDefinitionDto;
import io.inji.verify.spi.PresentationDefinitionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.inji.verify.verifyservice.controller;
package io.inji.verify.controller;

import io.inji.verify.verifyservice.dto.authorizationRequest.VPRequestCreateDto;
import io.inji.verify.verifyservice.dto.authorizationRequest.VPRequestResponseDto;
import io.inji.verify.verifyservice.dto.authorizationRequest.StatusDto;
import io.inji.verify.verifyservice.enums.SubmissionState;
import io.inji.verify.verifyservice.spi.VerifiablePresentationRequestService;
import io.inji.verify.dto.authorizationRequest.VPRequestCreateDto;
import io.inji.verify.dto.authorizationRequest.VPRequestResponseDto;
import io.inji.verify.dto.authorizationRequest.StatusDto;
import io.inji.verify.enums.SubmissionState;
import io.inji.verify.spi.VerifiablePresentationRequestService;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
Expand All @@ -31,11 +31,15 @@ public ResponseEntity<VPRequestResponseDto> createVPRequest(@Valid @RequestBody
@GetMapping(path = "/{requestId}/status")
public ResponseEntity<StatusDto> getStatus(@PathVariable String requestId) {

//is there submisn --> completed
// no submisn --> is expired --> expired
// no submisn --> is not expired --> pending

String transactionId = verifiablePresentationRequestService.getTransactionIdFor(requestId);
SubmissionState currentSubmissionState = verifiablePresentationRequestService.getCurrentAuthorizationRequestStateFor(requestId);
if (currentSubmissionState == null || transactionId == null)
return new ResponseEntity<>(null, HttpStatus.NOT_FOUND);

return new ResponseEntity<>(new StatusDto(transactionId, requestId, currentSubmissionState), HttpStatus.OK);
return new ResponseEntity<>(new StatusDto(currentSubmissionState), HttpStatus.OK);
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package io.inji.verify.verifyservice.controller;

import io.inji.verify.verifyservice.dto.submission.PresentationSubmissionDto;
import io.inji.verify.verifyservice.dto.submission.ResponseAcknowledgementDto;
import io.inji.verify.verifyservice.dto.submission.VPSubmissionDto;
import io.inji.verify.verifyservice.dto.submission.VPTokenResultDto;
import io.inji.verify.verifyservice.enums.SubmissionState;
import io.inji.verify.verifyservice.shared.Constants;
import io.inji.verify.verifyservice.spi.VerifiablePresentationRequestService;
import io.inji.verify.verifyservice.spi.VerifiablePresentationSubmissionService;
import io.inji.verify.verifyservice.singletons.GsonSingleton;
package io.inji.verify.controller;

import io.inji.verify.dto.submission.PresentationSubmissionDto;
import io.inji.verify.dto.submission.ResponseAcknowledgementDto;
import io.inji.verify.dto.submission.VPSubmissionDto;
import io.inji.verify.dto.submission.VPTokenResultDto;
import io.inji.verify.enums.SubmissionState;
import io.inji.verify.shared.Constants;
import io.inji.verify.spi.VerifiablePresentationRequestService;
import io.inji.verify.spi.VerifiablePresentationSubmissionService;
import io.inji.verify.singletons.GsonSingleton;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.inji.verify.verifyservice.dto.authorizationRequest;
package io.inji.verify.dto.authorizationRequest;

import io.inji.verify.verifyservice.models.PresentationDefinition;
import io.inji.verify.verifyservice.shared.Constants;
import io.inji.verify.models.PresentationDefinition;
import io.inji.verify.shared.Constants;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.inji.verify.verifyservice.dto.authorizationRequest;
package io.inji.verify.dto.authorizationRequest;

import io.inji.verify.verifyservice.enums.SubmissionState;
import io.inji.verify.enums.SubmissionState;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand All @@ -11,7 +11,5 @@
@NoArgsConstructor
@AllArgsConstructor
public class StatusDto {
String transactionId;
String requestId;
SubmissionState submissionState;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.inji.verify.verifyservice.dto.authorizationRequest;
package io.inji.verify.dto.authorizationRequest;

import io.inji.verify.verifyservice.dto.presentation.PresentationDefinitionDto;
import io.inji.verify.dto.presentation.PresentationDefinitionDto;
import lombok.*;

@Data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.dto.authorizationRequest;
package io.inji.verify.dto.authorizationRequest;

import lombok.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.dto.authorizationRequest;
package io.inji.verify.dto.authorizationRequest;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.dto.presentation;
package io.inji.verify.dto.presentation;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.dto.presentation;
package io.inji.verify.dto.presentation;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.dto.presentation;
package io.inji.verify.dto.presentation;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.dto.presentation;
package io.inji.verify.dto.presentation;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.dto.presentation;
package io.inji.verify.dto.presentation;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.dto.presentation;
package io.inji.verify.dto.presentation;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.dto.submission;
package io.inji.verify.dto.submission;


import com.fasterxml.jackson.annotation.JsonProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.dto.submission;
package io.inji.verify.dto.submission;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.inji.verify.verifyservice.dto.submission;
package io.inji.verify.dto.submission;

import io.inji.verify.verifyservice.enums.VerificationStatus;
import io.inji.verify.enums.VerificationStatus;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.dto.submission;
package io.inji.verify.dto.submission;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.nimbusds.jose.shaded.gson.annotations.SerializedName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.dto.submission;
package io.inji.verify.dto.submission;


import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.dto.submission;
package io.inji.verify.dto.submission;

import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.inji.verify.verifyservice.dto.submission;
package io.inji.verify.dto.submission;

import io.inji.verify.verifyservice.enums.SubmissionStatus;
import io.inji.verify.verifyservice.models.VCResult;
import io.inji.verify.enums.SubmissionStatus;
import io.inji.verify.models.VCResult;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.inji.verify.verifyservice.dto.verification;
package io.inji.verify.dto.verification;

import io.inji.verify.verifyservice.enums.VerificationStatus;
import io.inji.verify.enums.VerificationStatus;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.enums;
package io.inji.verify.enums;

public enum SubmissionState {
PENDING,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.enums;
package io.inji.verify.enums;

public enum SubmissionStatus {
SUCCESS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.enums;
package io.inji.verify.enums;

public enum VerificationStatus {
SUCCESS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.inji.verify.verifyservice.exception;
package io.inji.verify.exception;

public class VerificationFailedException extends Exception{
private static final String message = "Verification Failed";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.inji.verify.verifyservice.models;
package io.inji.verify.models;

import io.inji.verify.verifyservice.dto.authorizationRequest.AuthorizationRequestResponseDto;
import io.inji.verify.verifyservice.enums.SubmissionState;
import io.inji.verify.dto.authorizationRequest.AuthorizationRequestResponseDto;
import io.inji.verify.enums.SubmissionState;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.inji.verify.verifyservice.models;
package io.inji.verify.models;

import io.inji.verify.verifyservice.dto.presentation.InputDescriptorDto;
import io.inji.verify.verifyservice.dto.presentation.SubmissionRequirementDto;
import io.inji.verify.verifyservice.shared.Constants;
import io.inji.verify.dto.presentation.InputDescriptorDto;
import io.inji.verify.dto.presentation.SubmissionRequirementDto;
import io.inji.verify.shared.Constants;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.inji.verify.verifyservice.models;
package io.inji.verify.models;


import io.inji.verify.verifyservice.enums.VerificationStatus;
import io.inji.verify.enums.VerificationStatus;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.inji.verify.verifyservice.models;
package io.inji.verify.models;

import io.inji.verify.verifyservice.dto.submission.PresentationSubmissionDto;
import io.inji.verify.verifyservice.enums.SubmissionStatus;
import io.inji.verify.dto.submission.PresentationSubmissionDto;
import io.inji.verify.enums.SubmissionStatus;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.inji.verify.verifyservice.repository;
package io.inji.verify.repository;

import io.inji.verify.verifyservice.models.AuthorizationRequestCreateResponse;
import io.inji.verify.models.AuthorizationRequestCreateResponse;
import jakarta.validation.constraints.NotNull;
import org.springframework.data.jpa.repository.JpaRepository;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.inji.verify.verifyservice.repository;
package io.inji.verify.repository;

import io.inji.verify.verifyservice.models.PresentationDefinition;
import io.inji.verify.models.PresentationDefinition;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.inji.verify.verifyservice.repository;
package io.inji.verify.repository;

import io.inji.verify.verifyservice.models.VPSubmission;
import io.inji.verify.models.VPSubmission;
import org.springframework.data.jpa.repository.JpaRepository;

public interface VPSubmissionRepository extends JpaRepository<VPSubmission, String> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package io.inji.verify.verifyservice.services;
package io.inji.verify.services;

import io.inji.verify.verifyservice.singletons.CredentialsVerifierSingleton;
import io.inji.verify.dto.verification.VerificationStatusDto;
import io.inji.verify.enums.VerificationStatus;
import io.inji.verify.singletons.CredentialsVerifierSingleton;
import io.inji.verify.spi.CredentialVerificationService;
import io.mosip.vercred.vcverifier.constants.CredentialFormat;
import io.mosip.vercred.vcverifier.constants.CredentialValidatorConstants;
import io.mosip.vercred.vcverifier.data.VerificationResult;
import io.inji.verify.verifyservice.dto.verification.VerificationStatusDto;
import io.inji.verify.verifyservice.enums.VerificationStatus;
import io.inji.verify.verifyservice.spi.CredentialVerificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.inji.verify.verifyservice.services;
package io.inji.verify.services;

import io.inji.verify.verifyservice.dto.presentation.PresentationDefinitionDto;
import io.inji.verify.verifyservice.models.PresentationDefinition;
import io.inji.verify.verifyservice.spi.PresentationDefinitionService;
import io.inji.verify.verifyservice.repository.PresentationDefinitionRepository;
import io.inji.verify.dto.presentation.PresentationDefinitionDto;
import io.inji.verify.models.PresentationDefinition;
import io.inji.verify.spi.PresentationDefinitionService;
import io.inji.verify.repository.PresentationDefinitionRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

Expand Down
Loading

0 comments on commit 5a7bbc6

Please sign in to comment.