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

Otp login + profile create or fetch #9

Merged
merged 40 commits into from
Nov 15, 2024
Merged

Conversation

Arkmati
Copy link
Contributor

@Arkmati Arkmati commented Oct 25, 2024

No description provided.

…_auth

# Conflicts:
#	src/main/java/sg/edu/nus/iss/shopsmart_backend/utils/WSUtils.java
@PostMapping("/register/generateOtp/{profileType}")
public CompletableFuture<ResponseEntity<JsonNode>> generateOtpForRegister(@PathVariable String profileType, @RequestBody JsonNode requestBody,
HttpServletRequest request, HttpServletResponse response){
log.info("Starting flow for generate OTP for registration for profileType: {}", profileType);

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks Low

Change this code to not log user-controlled data. See more on SonarQube Cloud
@PostMapping("/register/verifyOtp/{profileType}")
public CompletableFuture<ResponseEntity<JsonNode>> verifyOtpForRegister(@PathVariable String profileType, @RequestBody JsonNode requestBody,
HttpServletRequest request, HttpServletResponse response){
log.info("Starting flow for validate OTP and createProfile for registration for profileType: {}", profileType);

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks Low

Change this code to not log user-controlled data. See more on SonarQube Cloud
@PostMapping("/login/generateOtp/{profileType}")
public CompletableFuture<ResponseEntity<JsonNode>> generateOtpForLogin(@PathVariable String profileType, @RequestBody JsonNode requestBody,
HttpServletRequest request, HttpServletResponse response){
log.info("Starting flow for generate OTP for login for profileType: {}", profileType);

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks Low

Change this code to not log user-controlled data. See more on SonarQube Cloud
@PostMapping("/login/verifyOtp/{profileType}")
public CompletableFuture<ResponseEntity<JsonNode>> verifyOtpForLogin(@PathVariable String profileType, @RequestBody JsonNode requestBody,
HttpServletRequest request, HttpServletResponse response){
log.info("Starting flow for validate OTP and createProfile for login for profileType: {}", profileType);

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks Low

Change this code to not log user-controlled data. See more on SonarQube Cloud
@@ -54,25 +49,116 @@
apiRequestResolver.setHeaders(headers);

// Extract query parameters
log.info("{} Extracting query parameters from request {}", apiRequestResolver.getCorrelationId(), request.getParameterMap());

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks Low

Change this code to not log user-controlled data. See more on SonarQube Cloud
});
}
private CompletableFuture<String> fetchUserIdForEmail(ApiRequestResolver apiRequestResolver, String email, String profileType){
log.info("{} fetching user id for email {} for profileType {}", apiRequestResolver.getLoggerString(), email, profileType);

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks Low

Change this code to not log user-controlled data. See more on SonarQube Cloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
10.0% Duplication on New Code (required ≤ 10%)

See analysis details on SonarQube Cloud

@Arkmati Arkmati merged commit d5de241 into Main Nov 15, 2024
5 of 6 checks passed
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.

4 participants