diff --git a/src/main/java/org/ntlab/acanthus_server/entities/Account.java b/src/main/java/org/ntlab/acanthus_server/entities/Account.java index f8536ba..58f16db 100644 --- a/src/main/java/org/ntlab/acanthus_server/entities/Account.java +++ b/src/main/java/org/ntlab/acanthus_server/entities/Account.java @@ -26,11 +26,12 @@ private String email; private String token; private String password; - //コンストラクト + + //コンストラクト public Account(String name, String email, String password) { - this.name=name; - this.email=email; - this.password=password; + this.name = name; + this.email = email; + this.password = password; } //uidを返す @@ -38,38 +39,41 @@ public int getUid() { return uid; } - public void setUid(){ - this.uid=uid; + + public void setUid(int uid) { + this.uid = uid; } - - + + //tokenを返す //GetとSetを実装 public String getToken() { return token; } - public void setToken(String token){ - this.token=token; + + public void setToken(String token) { + this.token = token; } + //passwordをtoken認証後返す public String getPassword(String token) { //IFでトークン認証をしたのちに返す return password; } + //emailを返す public String getEmail() { return email; } - public void setEmail(String email){ - this.email=email; + + public void setEmail(String email) { + this.email = email; } //Auth関数でpassword認証 - public boolean accountAuth(String password){ - return this.password == password; + public boolean isMatchedPassword(String password) { + return this.password.equals(password); } - - }