Clean up auth classes.

This commit is contained in:
Jesse Brault 2026-01-15 15:38:57 -06:00
parent bea8af4a0e
commit 14c911c283
5 changed files with 17 additions and 57 deletions

View File

@ -1,24 +1,9 @@
package app.mealsmadeeasy.api.auth;
public final class LoginBody {
import lombok.Data;
@Data
public class LoginBody {
private String username;
private String password;
public String getUsername() {
return this.username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return this.password;
}
public void setPassword(String password) {
this.password = password;
}
}

View File

@ -1,8 +1,10 @@
package app.mealsmadeeasy.api.auth;
import app.mealsmadeeasy.api.security.AuthToken;
import lombok.Getter;
public final class LoginDetails {
@Getter
public class LoginDetails {
private final String username;
private final AuthToken accessToken;
@ -14,16 +16,4 @@ public final class LoginDetails {
this.refreshToken = refreshToken;
}
public String getUsername() {
return this.username;
}
public AuthToken getAccessToken() {
return this.accessToken;
}
public RefreshToken getRefreshToken() {
return this.refreshToken;
}
}

View File

@ -1,6 +1,9 @@
package app.mealsmadeeasy.api.auth;
public final class LoginException extends Exception {
import lombok.Getter;
@Getter
public class LoginException extends Exception {
private final LoginExceptionReason reason;
@ -14,8 +17,4 @@ public final class LoginException extends Exception {
this.reason = reason;
}
public LoginExceptionReason getReason() {
return this.reason;
}
}

View File

@ -1,5 +1,8 @@
package app.mealsmadeeasy.api.auth;
import lombok.Getter;
@Getter
public class LoginExceptionView {
private final LoginExceptionReason reason;
@ -10,12 +13,4 @@ public class LoginExceptionView {
this.message = message;
}
public LoginExceptionReason getReason() {
return this.reason;
}
public String getMessage() {
return this.message;
}
}

View File

@ -1,8 +1,11 @@
package app.mealsmadeeasy.api.auth;
import lombok.Getter;
import java.time.LocalDateTime;
public final class LoginView {
@Getter
public class LoginView {
private final String username;
private final String accessToken;
@ -14,16 +17,4 @@ public final class LoginView {
this.expires = expires;
}
public String getUsername() {
return this.username;
}
public String getAccessToken() {
return this.accessToken;
}
public LocalDateTime getExpires() {
return this.expires;
}
}