fix: hide hashed password value from orm query
Java CI with Maven / build-and-test (pull_request) Failing after 15m19s
Java CI with Maven / build-and-test (pull_request) Failing after 15m19s
This commit is contained in:
@@ -2,6 +2,7 @@ package com.drinkool.models;
|
||||
|
||||
import com.drinkool.entities.BaseEntity;
|
||||
import com.drinkool.utils.PhoneValidator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.password4j.Password;
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.transaction.*;
|
||||
@@ -20,7 +21,8 @@ public abstract class UserModel extends BaseEntity {
|
||||
public String phone;
|
||||
|
||||
@Column(nullable = false, length = 1024)
|
||||
protected String hashedPassword;
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
public String hashedPassword;
|
||||
|
||||
@Transactional
|
||||
public void signup(String phone) {
|
||||
|
||||
Reference in New Issue
Block a user