Class ProfileServiceClient

java.lang.Object
com.hypixel.hytale.server.core.auth.ProfileServiceClient

public class ProfileServiceClient extends Object
HTTP client for communicating with the Profile Service API.
  • Constructor Details

    • ProfileServiceClient

      public ProfileServiceClient(@Nonnull String profileServiceUrl)
      Creates a new Profile Service client.
      Parameters:
      profileServiceUrl - The base URL of the Profile Service
  • Method Details

    • getProfileByUuid

      @Nullable public ProfileServiceClient.PublicGameProfile getProfileByUuid(@Nonnull UUID uuid, @Nonnull String bearerToken)
      Gets a player's public profile by UUID. GET /profile/uuid/{uuid}
      Parameters:
      uuid - The player's UUID
      bearerToken - The bearer token for authentication (identity token with hytale:client or hytale:server scope)
      Returns:
      The public game profile, or null if not found or request fails
    • getProfileByUuidAsync

      public CompletableFuture<ProfileServiceClient.PublicGameProfile> getProfileByUuidAsync(@Nonnull UUID uuid, @Nonnull String bearerToken)
      Gets a player's public profile by UUID asynchronously. GET /profile/uuid/{uuid}
      Parameters:
      uuid - The player's UUID
      bearerToken - The bearer token for authentication
      Returns:
      CompletableFuture with the public game profile, or null if not found
    • getProfileByUsername

      @Nullable public ProfileServiceClient.PublicGameProfile getProfileByUsername(@Nonnull String username, @Nonnull String bearerToken)
      Gets a player's public profile by username. GET /profile/username/{username}
      Parameters:
      username - The player's username
      bearerToken - The bearer token for authentication (identity token with hytale:client or hytale:server scope)
      Returns:
      The public game profile, or null if not found or request fails
    • getProfileByUsernameAsync

      public CompletableFuture<ProfileServiceClient.PublicGameProfile> getProfileByUsernameAsync(@Nonnull String username, @Nonnull String bearerToken)
      Gets a player's public profile by username asynchronously. GET /profile/username/{username}
      Parameters:
      username - The player's username
      bearerToken - The bearer token for authentication
      Returns:
      CompletableFuture with the public game profile, or null if not found