Class MSJavaAccessTokenAuthService
java.lang.Object
com.soulfiremc.server.account.MSJavaAccessTokenAuthService
- All Implemented Interfaces:
MCAuthService<String, MSJavaAccessTokenAuthService.MSJavaAccessTokenAuthData>
public final class MSJavaAccessTokenAuthService
extends Object
implements MCAuthService<String, MSJavaAccessTokenAuthService.MSJavaAccessTokenAuthData>
Authentication service for raw Minecraft Java access tokens.
Validates the token by fetching the associated profile from Mojang's API.
Access token accounts cannot be refreshed; they are used until expiry.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateData(String data) booleanisExpired(MinecraftAccount account) login(MSJavaAccessTokenAuthService.MSJavaAccessTokenAuthData data, @Nullable SFProxy proxyData, Executor executor) refresh(MinecraftAccount account, @Nullable SFProxy proxyData, Executor executor) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MCAuthService
createDataAndLogin
-
Field Details
-
INSTANCE
-
-
Method Details
-
login
public CompletableFuture<MinecraftAccount> login(MSJavaAccessTokenAuthService.MSJavaAccessTokenAuthData data, @Nullable SFProxy proxyData, Executor executor) - Specified by:
loginin interfaceMCAuthService<String, MSJavaAccessTokenAuthService.MSJavaAccessTokenAuthData>
-
createData
- Specified by:
createDatain interfaceMCAuthService<String, MSJavaAccessTokenAuthService.MSJavaAccessTokenAuthData>
-
refresh
public CompletableFuture<MinecraftAccount> refresh(MinecraftAccount account, @Nullable SFProxy proxyData, Executor executor) - Specified by:
refreshin interfaceMCAuthService<String, MSJavaAccessTokenAuthService.MSJavaAccessTokenAuthData>
-
isExpired
- Specified by:
isExpiredin interfaceMCAuthService<String, MSJavaAccessTokenAuthService.MSJavaAccessTokenAuthData>
-