-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sreenadh S <[email protected]>
- Loading branch information
Showing
13 changed files
with
68 additions
and
42 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
8 changes: 8 additions & 0 deletions
8
verify-core/src/main/java/io/mosip/verifycore/exception/VerificationFailedException.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,8 @@ | ||
package io.mosip.verifycore.exception; | ||
|
||
public class VerificationFailedException extends Exception{ | ||
private static final String message = "Verification Failed"; | ||
public VerificationFailedException() { | ||
super(message); | ||
} | ||
} |
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
5 changes: 5 additions & 0 deletions
5
verify-core/src/main/java/io/mosip/verifycore/shared/Config.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,5 @@ | ||
package io.mosip.verifycore.shared; | ||
|
||
public class Config { | ||
public static int DEFAULT_EXPIRY = 300; | ||
} |
19 changes: 18 additions & 1 deletion
19
verify-core/src/main/java/io/mosip/verifycore/shared/Constants.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 |
---|---|---|
@@ -1,5 +1,22 @@ | ||
package io.mosip.verifycore.shared; | ||
|
||
public class Constants { | ||
public static int DEFAULT_EXPIRY = 300; | ||
public static final String RESPONSE_SUBMISSION_URI = "/vp-direct-post"; | ||
public static final String VP_DEFINITION_URI = "/vp-definition/"; | ||
public static final String RESPONSE_TYPE = "vp_token"; | ||
|
||
public static final String PUBLIC_KEY_HEADER = "-----BEGIN PUBLIC KEY-----"; | ||
public static final String PUBLIC_KEY_FOOTER = "-----END PUBLIC KEY-----"; | ||
public static final String TRANSACTION_ID_PREFIX = "txn"; | ||
public static final String REQUEST_ID_PREFIX = "req"; | ||
public static final String VC_EXPIRED_ERROR_CODE = "ERR_VC_EXPIRED"; | ||
|
||
//JSON KEYS | ||
public static final String KEY_PROOF = "proof"; | ||
public static final String KEY_JWS = "jws"; | ||
public static final String KEY_VERIFICATION_METHOD = "verificationMethod"; | ||
public static final String KEY_VERIFIABLE_CREDENTIAL = "verifiableCredential"; | ||
public static final String KEY_CREDENTIAL = "credential"; | ||
|
||
|
||
} |
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
5 changes: 0 additions & 5 deletions
5
verify-core/src/main/java/io/mosip/verifycore/utils/Utils.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 |
---|---|---|
@@ -1,14 +1,9 @@ | ||
package io.mosip.verifycore.utils; | ||
|
||
import jakarta.servlet.http.HttpServletRequest; | ||
import java.util.UUID; | ||
|
||
public class Utils { | ||
public static String createID(String prefix){ | ||
return prefix+"_"+UUID.randomUUID(); | ||
} | ||
|
||
public static String getServerAddress(HttpServletRequest request) { | ||
return request.getRequestURL().toString().replaceAll(request.getServletPath(),""); | ||
} | ||
} |
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
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