Updated session version

This commit is contained in:
2026-02-20 02:15:15 +01:00
parent 5d8068c964
commit 57c1d21407
2 changed files with 6 additions and 27 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ dependencies {
modApi "dev.felnull:special-model-loader:1.4.0+pre.1"
include "dev.felnull:special-model-loader:1.4.0+pre.1"
implementation 'com.github.selimaj-dev:session-java:v0.1.0'
implementation 'com.github.selimaj-dev:session-java:0.1.3'
include modImplementation("dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}")
//You might want bendy-lib. playerAnimator will wrap it.
@@ -1,36 +1,15 @@
package org.saturnclient.saturnclient.client;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.JsonNodeType;
import com.fasterxml.jackson.databind.node.TextNode;
import dev.selimaj.session.types.Method;
public class ServiceMethods {
public static class AuthResponse extends JsonNode {
@JsonProperty(required = true)
private String token;
@JsonProperty(required = true)
private String userId;
// Constructor enforcing required fields
public AuthResponse(String token, String userId) {
this.token = token;
this.userId = userId;
public record AuthResponse(
String username,
String password) {
}
// Default constructor needed for Jackson deserialization
public AuthResponse() {
}
@Override
public JsonNodeType getNodeType() {
return JsonNodeType.OBJECT;
}
}
public static final Method<TextNode, AuthResponse, TextNode> Authenticate = new Method<>("auth",
TextNode.class, TextNode.class, TextNode.class);
public static final Method<TextNode, AuthResponse, TextNode> Authenticate = new Method<>("auth",
TextNode.class, AuthResponse.class, TextNode.class);
}