-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INJIWEB-43] refractored v2 apis to existing controller (#188)
* [INJIWEB-43]added inji web apis Signed-off-by: Challarao <[email protected]> * [INJIWEB-43]added header for custom file name for pdf download Signed-off-by: Challarao <[email protected]> * [INJIWEB-43] fix dto naming to camel case and change route for credential supported API Signed-off-by: Challarao <[email protected]> * [INJIWEB-43] changed exception handling for credential types Signed-off-by: Challarao <[email protected]>
- Loading branch information
1 parent
65d1140
commit 015f1de
Showing
27 changed files
with
1,180 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/main/java/io/mosip/mimoto/dto/mimoto/CredentialDefinitionResponseDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package io.mosip.mimoto.dto.mimoto; | ||
|
||
import lombok.Data; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Data | ||
public class CredentialDefinitionResponseDto { | ||
private List<String> type; | ||
private Map<String, CredentialDisplayResponseDto> credentialSubject; | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/io/mosip/mimoto/dto/mimoto/CredentialDisplayResponseDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package io.mosip.mimoto.dto.mimoto; | ||
|
||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
public class CredentialDisplayResponseDto { | ||
private List<CredentialIssuerDisplayResponse> display; | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/io/mosip/mimoto/dto/mimoto/CredentialIssuerDisplayResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package io.mosip.mimoto.dto.mimoto; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class CredentialIssuerDisplayResponse { | ||
private String name; | ||
private String locale; | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/io/mosip/mimoto/dto/mimoto/CredentialIssuerWellKnownResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package io.mosip.mimoto.dto.mimoto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
public class CredentialIssuerWellKnownResponse { | ||
@SerializedName("credential_issuer") | ||
@JsonProperty("credential_issuer") | ||
private String credentialIssuer; | ||
|
||
@SerializedName("credential_endpoint") | ||
@JsonProperty("credential_endpoint") | ||
private String credentialEndPoint; | ||
|
||
@SerializedName("credentials_supported") | ||
@JsonProperty("credentials_supported") | ||
private List<CredentialsSupportedResponse> credentialsSupported; | ||
} |
38 changes: 38 additions & 0 deletions
38
src/main/java/io/mosip/mimoto/dto/mimoto/CredentialSupportedDisplayResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package io.mosip.mimoto.dto.mimoto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.google.gson.annotations.Expose; | ||
import com.google.gson.annotations.SerializedName; | ||
import io.mosip.mimoto.dto.LogoDTO; | ||
import lombok.Data; | ||
|
||
import javax.validation.Valid; | ||
import javax.validation.constraints.NotBlank; | ||
|
||
@Data | ||
public class CredentialSupportedDisplayResponse { | ||
|
||
@Expose | ||
@NotBlank | ||
String name; | ||
|
||
@Expose | ||
@Valid | ||
LogoDTO logo; | ||
|
||
@Expose | ||
@NotBlank | ||
String locale; | ||
|
||
@JsonProperty("background_color") | ||
@SerializedName("background_color") | ||
@Expose | ||
@NotBlank | ||
String backgroundColor; | ||
|
||
@JsonProperty("text_color") | ||
@SerializedName("text_color") | ||
@Expose | ||
@NotBlank | ||
String textColor; | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/io/mosip/mimoto/dto/mimoto/CredentialsSupportedResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package io.mosip.mimoto.dto.mimoto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
public class CredentialsSupportedResponse { | ||
private String format; | ||
private String id; | ||
private String scope; | ||
|
||
@SerializedName("proof_types_supported") | ||
@JsonProperty("proof_types_supported") | ||
private List<String> proofTypesSupported; | ||
|
||
@SerializedName("credential_definition") | ||
@JsonProperty("credential_definition") | ||
private CredentialDefinitionResponseDto credentialDefinition; | ||
|
||
private List<CredentialSupportedDisplayResponse> display; | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/io/mosip/mimoto/dto/mimoto/IssuerSupportedCredentialsResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package io.mosip.mimoto.dto.mimoto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
public class IssuerSupportedCredentialsResponse { | ||
@JsonProperty("authorization_endpoint") | ||
private String authorizationEndPoint; | ||
private List<CredentialsSupportedResponse> supportedCredentials; | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/io/mosip/mimoto/dto/mimoto/VCCredentialDefinition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package io.mosip.mimoto.dto.mimoto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
import javax.validation.constraints.NotEmpty; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Data | ||
@Builder | ||
public class VCCredentialDefinition { | ||
|
||
@JsonProperty("@context") | ||
private List<@NotBlank String> context; | ||
|
||
@NotEmpty | ||
private List<@NotBlank String> type; | ||
|
||
private Map<String, Object> credentialSubject; | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/io/mosip/mimoto/dto/mimoto/VCCredentialIssueBody.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package io.mosip.mimoto.dto.mimoto; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class VCCredentialIssueBody { | ||
private VCCredentialProperties credential; | ||
private String credentialSchemaId; | ||
private String createdAt; | ||
private String createdBy; | ||
private String updatedAt; | ||
private String updatedBy; | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/io/mosip/mimoto/dto/mimoto/VCCredentialProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package io.mosip.mimoto.dto.mimoto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
import javax.validation.constraints.NotEmpty; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Data | ||
public class VCCredentialProperties { | ||
private String issuer; | ||
|
||
private String id; | ||
|
||
private String issuanceDate; | ||
|
||
private VCCredentialResponseProof proof; | ||
|
||
private Map<String, Object> credentialSubject; | ||
|
||
@JsonProperty("@context") | ||
private Object context; | ||
|
||
@NotEmpty | ||
private List<@NotBlank String> type; | ||
} |
Oops, something went wrong.