Class LicenseController

java.lang.Object
de.bytestore.hostinger.internal.api.space.LicenseController

@RestController @Configuration @RequestMapping("/internal/license") public class LicenseController extends Object
  • Constructor Details

    • LicenseController

      public LicenseController()
  • Method Details

    • licenseList

      @GetMapping("/") public String licenseList()
    • licenseDownload

      @GetMapping("/{uuid}/download") public void licenseDownload(@PathVariable String uuid, jakarta.servlet.http.HttpServletResponse responseIO) throws IOException
      Downloads a license file.
      Parameters:
      uuid - The UUID of the license to download.
      responseIO - The HttpServletResponse object used for sending the file to the client.
      Throws:
      IOException
    • licenseRenew

      @PostMapping("/{uuid}/renew/{hwid}") public String licenseRenew(@PathVariable String uuid, @PathVariable String hwid, jakarta.servlet.http.HttpServletRequest request)
      Renews a license with the given UUID and HWID.
      Parameters:
      uuid - The UUID of the license to renew.
      hwid - The HWID (Hardware ID) to associate with the renewed license.
      request - The HttpServletRequest object containing the request information.
      Returns:
      A JSON string representing the status of the license renewal. The string contains a status field with values "SUCCESS" or "ERROR", and a message field with a corresponding message. If the license is expired, the status will be "ERROR" and the message will be "License is expired." If the HWID is missing, the status will be "ERROR" and the message will be "Missing HWID." If the license is not found, the status will be "ERROR" and the message will be "License not found." If the license renewal is successful, the status will be "SUCCESS" and the message will be "License renewed."
    • getRequestBodyAsJson

      public com.google.gson.JsonObject getRequestBodyAsJson(jakarta.servlet.http.HttpServletRequest request)