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

feat : HCX-964 Implement QR Code Generation #614

Open
wants to merge 25 commits into
base: sprint-55
Choose a base branch
from

Conversation

KrutikaPhirangi
Copy link
Contributor

No description provided.

Copy link
Contributor

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.

Copy link
Contributor

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.

Comment on lines 72 to 77
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());
Copy link
Contributor

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"));
Copy link
Contributor

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 {
Copy link
Contributor

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.

@KrutikaPhirangi KrutikaPhirangi changed the base branch from sprint-54 to sprint-55 February 19, 2024 05:04
Copy link

sonarqubecloud bot commented Mar 7, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants