Class RegisterEndpoint

java.lang.Object
io.levysworks.endpoints.RegisterEndpoint

@Path("/api/v1/register") public class RegisterEndpoint extends Object
Endpoint used by users to request new OpenSSH keys
Rate limited to 1 request per day
  • Field Details

  • Constructor Details

    • RegisterEndpoint

      public RegisterEndpoint()
  • Method Details

    • registerKey

      @GET @Produces("application/octet-stream") public jakarta.ws.rs.core.Response registerKey(@QueryParam("user") String user_uuid, @QueryParam("server") String agent) throws IOException, InterruptedException, io.smallrye.faulttolerance.api.RateLimitException, SQLException
      Generates an OpenSSH-compliant keypair and returns the private key as a downloadable file. The corresponding public key is stored in the pending requests table for the specified server.
      Parameters:
      user_uuid - UUID of the requesting user
      agent - Name of the target server
      Returns:
      HTTP response containing the private key as an attachment
      Throws:
      IOException - if key generation fails
      InterruptedException - if the key generation process is interrupted
      SQLException - if a database error occurs
      io.smallrye.faulttolerance.api.RateLimitException - if the request exceeds rate limits