Feat#1 creating auth-service, with JUnit test #14
No reviewers
Labels
No labels
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Support
Type
Task
Type
Testing
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: clevermicro/user-management#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "Create-Auth-Microservice#1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I included the JUnit test class with this version since I already completed it before making the ticket for the test.
@ -0,0 +64,4 @@
public Mono<ResponseEntity<VerificationResponse>> verify(@RequestHeader(HttpHeaders.AUTHORIZATION) String authorizationHeader) {
log.info("Received token verification request");
if (authorizationHeader == null || !authorizationHeader.startsWith("Bearer ")) {
log.warn("Verification request missing or invalid Bearer token format.");
Please add the actual token string to the log message, this will help greatly with debugging (and invalid token leaks no security info)
Added
@ -0,0 +57,4 @@
@ExceptionHandler(Exception.class)
public ProblemDetail handleGenericException(Exception ex) {
logger.error("An unexpected error occurred: ", ex); // Log the full stack trace
ProblemDetail problemDetail = ProblemDetail.forStatusAndDetail(HttpStatus.INTERNAL_SERVER_ERROR, "An unexpected internal error occurred.");
please remove the word 'unexpected' from the message, it gives kind of bad impression when the software reports something 'unexpected', it feels like we made insufficient design and there are things we did not think of.
String "An internal error occurred." will be just fine.
Yes, you are right, I changed it.
Check style used two, sorry, I forgot that I changed my IDE :)
Hi Abed,
may I kindly ask to review the parts with commented out code, generally we do not want to keep commented out logic in the source code, unless it refers to future features that are yet to be implemented and that would break the code if present before full implementation, and in this case, please mention this fact in the commented out code itself.
Also, i believe there's a checkstyle rule that says the line of code should not be longer than 100 chars. i know it is bit limiting if you have wide big monitor, but can you perhaps edit your IDE settings to indicate the 100 chars limit and try to fit the Java code line length within that 100chars, where feasible?