Skip to content

Commit

Permalink
corrected by coderabbit comments
Browse files Browse the repository at this point in the history
  • Loading branch information
IN40068837 authored and IN40068837 committed Dec 10, 2024
1 parent 0f43112 commit 59be63d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 45 deletions.
2 changes: 1 addition & 1 deletion src/main/environment/common_ci.properties
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ tcSpeclistWL=7

### Redis IP
spring.redis.host=localhost
jwt.secret=<Enter_Your_Secret_Key>
jwt.secret=@JWT_SECRET_KEY@



2 changes: 1 addition & 1 deletion src/main/environment/common_dev.properties
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ tcSpeclistWL=7
prescription=TMPrescription SMS
### Redis IP
spring.redis.host=localhost
jwt.secret=<Enter_Your_Secret_Key>
jwt.secret=@JWT_SECRET_KEY@

2 changes: 1 addition & 1 deletion src/main/environment/common_test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ prescription=TMPrescription SMS

### Redis IP
spring.redis.host=localhost
jwt.secret=<Enter_Your_Secret_Key>
jwt.secret=@JWT_SECRET_KEY@



2 changes: 1 addition & 1 deletion src/main/environment/common_uat.properties
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ tcSpeclistWL=7
prescription=TMPrescription SMS
### Redis IP
spring.redis.host=localhost
jwt.secret=<Enter_Your_Secret_Key>
jwt.secret=@JWT_SECRET_KEY@


39 changes: 2 additions & 37 deletions src/main/java/com/iemr/tm/data/login/Users.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public class Users {
@Column(name = "UserID")
private Long userID;
@Expose
@Column(name = "TitleID") private Short titleID;
@Column(name = "TitleID")
private Short titleID;
@Expose
@Column(name = "FirstName")
private String firstName;
Expand All @@ -60,48 +61,12 @@ public class Users {
@Column(name = "MaritalStatusID")
private Short maritalStatusID;
@Expose
@Column(name = "AadhaarNo")
private String aadhaarNo;
@Expose
@Column(name = "PAN")
private String pan;
@Expose
@Column(name = "DOB")
private Timestamp dob;
@Expose
@Column(name = "DOJ")
private Timestamp doj;
@Expose
@Column(name = "QualificationID")
private Integer qualificationID;
@Expose
@Column(name = "UserName")
private String userName;
@Expose
@Column(name = "Password")
private String password;
@Expose
@Column(name = "AgentID")
private String agentID;
@Expose
@Column(name = "AgentPassword")
private String agentPassword;
@Expose
@Column(name = "EmailID")
private String emailID;
@Expose
@Column(name = "StatusID")
private Short statusID;
@Expose
@Column(name = "EmergencyContactPerson")
private String emergencyContactPerson;
@Expose
@Column(name = "EmergencyContactNo")
private String emergencyContactNo;
@Expose
@Column(name = "IsSupervisor")
private Boolean isSupervisor;
@Expose
@Column(name = "Deleted")
private Boolean deleted;
@Expose
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/iemr/tm/utils/JwtAuthenticationUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
public class JwtAuthenticationUtil {

@Autowired
private final CookieUtil cookieUtil;
private CookieUtil cookieUtil;
@Autowired
private final JwtUtil jwtUtil;
private JwtUtil jwtUtil;
@Autowired
private UserLoginRepo userLoginRepo;
private final Logger logger = LoggerFactory.getLogger(this.getClass().getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo

// Log headers for debugging
String jwtTokenFromHeader = request.getHeader("Jwttoken");
logger.info("JWT token from header: " + jwtTokenFromHeader);
logger.info("JWT token from header: ");

// Skip login and public endpoints
if (path.equals(contextPath + "/user/userAuthenticate")
Expand All @@ -64,7 +64,7 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo
try {
// Retrieve JWT token from cookies
String jwtTokenFromCookie = getJwtTokenFromCookies(request);
logger.info("JWT token from cookie: " + jwtTokenFromCookie);
logger.info("JWT token from cookie: ");

// Determine which token (cookie or header) to validate
String jwtToken = jwtTokenFromCookie != null ? jwtTokenFromCookie : jwtTokenFromHeader;
Expand Down

0 comments on commit 59be63d

Please sign in to comment.