This endpoint allows you to create a new signing key pair for FastPix. When you call this endpoint, the API generates a 2048-bit RSA key pair. The privateKey
will be returned in the response, encoded in Base64 format, and you will receive a unique key id to reference the key in future operations. FastPix will securely store the public key to validate signed tokens.
Once the key pair is generated, the privateKey
must be securely stored by the developer, as FastPix will not save it. The public key will be used by FastPix to verify any signed tokens, ensuring that the client interacting with the system is legitimate.
Example
In a video-on-demand platform, when a user logs in, a JWT is generated with their subscription details and a list of videos they have access to. The JWT is signed using a privatekey
, and when the user attempts to stream a video, the token is included in the request URL (e.g., https://yourplatform.com/stream?token=<JWT_TOKEN>
). FastPix then verifies the JWT using a corresponding public key to ensure the token is valid and that the user’s subscription allows access to the requested content. If the token is valid and the user is authorized, the video is streamed; otherwise, access is denied.