-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat : HCX-964 Implement QR Code Generation #614
base: sprint-55
Are you sure you want to change the base?
feat : HCX-964 Implement QR Code Generation #614
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is not required. Please don't commit this.
hcx-qr-code-generator/pom.xml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maintain an order when you add dependencies to a POM file.
- Modules implemented within the project.
- External dependencies.
- Test dependencies.
MultiFormatWriter writer = new MultiFormatWriter(); | ||
BitMatrix matrix = writer.encode(content, BarcodeFormat.QR_CODE, 150, 150); | ||
String currentDir = System.getProperty("user.dir"); | ||
Path path = FileSystems.getDefault().getPath(currentDir + "/qr_code.png"); | ||
MatrixToImageWriter.writeToPath(matrix, "PNG", path); | ||
System.out.println("QR code image generated and saved to: " + path.toAbsolutePath()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Define a config file and expect these values from configuration.
- Don't use a static name for the QR code image.
Gson gson = new Gson(); | ||
Map<String, Object> map = gson.fromJson(json, HashMap.class); | ||
System.out.println("Map received from command line argument:"); | ||
generateJWSToken((Map<String, Object>) map.get("payload"), (String) map.get("signingPrivateKey")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Private key shouldn't be a parameter here. It should be a configuration to the tool to use and execute.
return payload; | ||
} | ||
|
||
public static Map<String, Object> createVerifiableCredential(Map<String, Object> payload, String proofValue) throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please consider using templating engines here.
Quality Gate passedIssues Measures |
No description provided.