© 2025 Codu Systems Inc.
public class AuthService {
public User login(String username, String password) {
if (isValid(username, password)) {
return new User(username);
} else {
throw new AuthException("Invalid credentials");
}
}
private boolean isValid(String u, String p) { }
}
System Online