Package io.levysworks.endpoints
Class RegisterEndpoint
java.lang.Object
io.levysworks.endpoints.RegisterEndpoint
Endpoint used by users to request new OpenSSH keys
Rate limited to 1 request per day
Rate limited to 1 request per day
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponseregisterKey(String user_uuid, String agent) Generates an OpenSSH-compliant keypair and returns the private key as a downloadable file.
-
Field Details
-
pollManager
-
dbManager
-
-
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 useragent- Name of the target server- Returns:
- HTTP response containing the private key as an attachment
- Throws:
IOException- if key generation failsInterruptedException- if the key generation process is interruptedSQLException- if a database error occursio.smallrye.faulttolerance.api.RateLimitException- if the request exceeds rate limits
-