]> git.ipfire.org Git - pakfire.git/log
pakfire.git
4 months agojson: Optionally return the length of the serialized string
Michael Tremer [Wed, 25 Jun 2025 16:47:59 +0000 (16:47 +0000)] 
json: Optionally return the length of the serialized string

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Remove some unused code
Michael Tremer [Wed, 25 Jun 2025 16:33:16 +0000 (16:33 +0000)] 
daemon: Remove some unused code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuilder: Build scaffolding to submit stats regularly
Michael Tremer [Wed, 25 Jun 2025 16:30:31 +0000 (16:30 +0000)] 
builder: Build scaffolding to submit stats regularly

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Don't let the HTTP client think it is running standalone
Michael Tremer [Wed, 25 Jun 2025 16:13:27 +0000 (16:13 +0000)] 
client: Don't let the HTTP client think it is running standalone

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojob: Use the context's event loop
Michael Tremer [Wed, 25 Jun 2025 15:54:38 +0000 (15:54 +0000)] 
job: Use the context's event loop

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Remove the HTTP client
Michael Tremer [Wed, 25 Jun 2025 15:52:38 +0000 (15:52 +0000)] 
daemon: Remove the HTTP client

This is now all fully merged into the high-level client.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Drop all sorts of timers and what not
Michael Tremer [Wed, 25 Jun 2025 15:51:29 +0000 (15:51 +0000)] 
daemon: Drop all sorts of timers and what not

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Move builder stuff into a separate object
Michael Tremer [Wed, 25 Jun 2025 15:48:48 +0000 (15:48 +0000)] 
client: Move builder stuff into a separate object

This is messy as hell. I moved so much stuff around and lost track of
most of it. So this is a commit to kind of have some baseline.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocli: Fix initializing the client
Michael Tremer [Wed, 25 Jun 2025 15:48:13 +0000 (15:48 +0000)] 
cli: Fix initializing the client

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohttpclient: Drop unused function to return the event loop
Michael Tremer [Wed, 25 Jun 2025 15:40:39 +0000 (15:40 +0000)] 
httpclient: Drop unused function to return the event loop

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Use the context's event loop
Michael Tremer [Wed, 25 Jun 2025 15:39:17 +0000 (15:39 +0000)] 
client: Use the context's event loop

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohttpclient: Use the context's loop
Michael Tremer [Wed, 25 Jun 2025 15:36:16 +0000 (15:36 +0000)] 
httpclient: Use the context's loop

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoctx: Create an event loop
Michael Tremer [Wed, 25 Jun 2025 15:26:46 +0000 (15:26 +0000)] 
ctx: Create an event loop

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Create the control connection as soon as the client is ready
Michael Tremer [Wed, 25 Jun 2025 13:42:52 +0000 (13:42 +0000)] 
daemon: Create the control connection as soon as the client is ready

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Require full authentication when the refresh token has expired
Michael Tremer [Wed, 25 Jun 2025 13:18:19 +0000 (13:18 +0000)] 
client: Require full authentication when the refresh token has expired

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Don't require reauthentication when we have some tokens
Michael Tremer [Wed, 25 Jun 2025 13:17:43 +0000 (13:17 +0000)] 
client: Don't require reauthentication when we have some tokens

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojwt: Add a convenience function to check whether a token has expires
Michael Tremer [Wed, 25 Jun 2025 13:17:16 +0000 (13:17 +0000)] 
jwt: Add a convenience function to check whether a token has expires

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Refresh auth tokens when a timer fires
Michael Tremer [Wed, 25 Jun 2025 13:09:05 +0000 (13:09 +0000)] 
client: Refresh auth tokens when a timer fires

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Immediately fetch an access token when loading from store
Michael Tremer [Wed, 25 Jun 2025 13:06:20 +0000 (13:06 +0000)] 
client: Immediately fetch an access token when loading from store

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Actually set the auth refresh payload
Michael Tremer [Wed, 25 Jun 2025 13:05:59 +0000 (13:05 +0000)] 
client: Actually set the auth refresh payload

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Move authentication refresh function to the top
Michael Tremer [Wed, 25 Jun 2025 13:01:37 +0000 (13:01 +0000)] 
client: Move authentication refresh function to the top

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Break setting the tokens into helper functions
Michael Tremer [Wed, 25 Jun 2025 12:40:47 +0000 (12:40 +0000)] 
client: Break setting the tokens into helper functions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Read/write credentials of the principal
Michael Tremer [Wed, 25 Jun 2025 12:22:49 +0000 (12:22 +0000)] 
client: Read/write credentials of the principal

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Add helper function to write JSON data to file
Michael Tremer [Wed, 25 Jun 2025 12:22:20 +0000 (12:22 +0000)] 
json: Add helper function to write JSON data to file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoutil: Remove pakfire argument from pakfire_file_write
Michael Tremer [Wed, 25 Jun 2025 12:09:40 +0000 (12:09 +0000)] 
util: Remove pakfire argument from pakfire_file_write

This is not needed any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Use the hostname as default principal
Michael Tremer [Wed, 25 Jun 2025 12:00:31 +0000 (12:00 +0000)] 
client: Use the hostname as default principal

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Add some principal to the client
Michael Tremer [Wed, 25 Jun 2025 11:57:06 +0000 (11:57 +0000)] 
client: Add some principal to the client

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Call the upload callback when the upload has finished
Michael Tremer [Wed, 25 Jun 2025 11:18:47 +0000 (11:18 +0000)] 
client: Call the upload callback when the upload has finished

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Remove any left-over uploads when freeing the client
Michael Tremer [Wed, 25 Jun 2025 11:16:48 +0000 (11:16 +0000)] 
client: Remove any left-over uploads when freeing the client

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Automatically remove uploads from queue on free
Michael Tremer [Wed, 25 Jun 2025 11:16:21 +0000 (11:16 +0000)] 
client: Automatically remove uploads from queue on free

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Don't attempt to parse a JSON response when there is no data
Michael Tremer [Wed, 25 Jun 2025 10:58:26 +0000 (10:58 +0000)] 
xfer: Don't attempt to parse a JSON response when there is no data

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Call the API callback on uploads, too
Michael Tremer [Wed, 25 Jun 2025 10:58:01 +0000 (10:58 +0000)] 
xfer: Call the API callback on uploads, too

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocli: Refactor storing authentication credentials
Michael Tremer [Wed, 25 Jun 2025 10:37:17 +0000 (10:37 +0000)] 
cli: Refactor storing authentication credentials

The config object will be removed once we have finished initializing the
other objects. Therefore we will have to copy the credentials somewhere
else before.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocli: client: Always load client.conf
Michael Tremer [Wed, 25 Jun 2025 10:36:41 +0000 (10:36 +0000)] 
cli: client: Always load client.conf

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocli: Read credentials from the configuration file (for now)
Michael Tremer [Wed, 25 Jun 2025 10:25:23 +0000 (10:25 +0000)] 
cli: Read credentials from the configuration file (for now)

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Remove unused string extraction function
Michael Tremer [Wed, 25 Jun 2025 10:14:43 +0000 (10:14 +0000)] 
client: Remove unused string extraction function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Create separate timers for access/refresh token refresh
Michael Tremer [Wed, 25 Jun 2025 10:13:07 +0000 (10:13 +0000)] 
client: Create separate timers for access/refresh token refresh

These are also now only initialized when we actually need them. That
helps us to deal with all those status changes.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agohttpclient: Remove launch protection without transfers
Michael Tremer [Wed, 25 Jun 2025 10:02:21 +0000 (10:02 +0000)] 
httpclient: Remove launch protection without transfers

We need this so that we can lazy-initialize the client.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Call the auth callback when we need authentication
Michael Tremer [Wed, 25 Jun 2025 10:01:44 +0000 (10:01 +0000)] 
client: Call the auth callback when we need authentication

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocli: Create a dummy authentication function
Michael Tremer [Wed, 25 Jun 2025 10:01:20 +0000 (10:01 +0000)] 
cli: Create a dummy authentication function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Call the ready callback once we are successfully authenticated
Michael Tremer [Wed, 25 Jun 2025 10:00:42 +0000 (10:00 +0000)] 
client: Call the ready callback once we are successfully authenticated

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocli: auth: Use the new ready callback
Michael Tremer [Wed, 25 Jun 2025 09:45:59 +0000 (09:45 +0000)] 
cli: auth: Use the new ready callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocli: Use the new ready function to start the uploads
Michael Tremer [Wed, 25 Jun 2025 09:32:48 +0000 (09:32 +0000)] 
cli: Use the new ready function to start the uploads

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Call an init function whenever the event loop starts
Michael Tremer [Wed, 25 Jun 2025 09:32:00 +0000 (09:32 +0000)] 
client: Call an init function whenever the event loop starts

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Add a ready callback
Michael Tremer [Wed, 25 Jun 2025 09:23:24 +0000 (09:23 +0000)] 
client: Add a ready callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Implement asynchronous uploads
Michael Tremer [Wed, 25 Jun 2025 09:02:36 +0000 (09:02 +0000)] 
client: Implement asynchronous uploads

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoprogress: Allow restart by keeping the state up to date
Michael Tremer [Wed, 25 Jun 2025 08:49:33 +0000 (08:49 +0000)] 
progress: Allow restart by keeping the state up to date

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Log an error when we want to use authentication without being authenticated
Michael Tremer [Tue, 24 Jun 2025 17:01:06 +0000 (17:01 +0000)] 
client: Log an error when we want to use authentication without being authenticated

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Remove keytab
Michael Tremer [Tue, 24 Jun 2025 16:14:40 +0000 (16:14 +0000)] 
client: Remove keytab

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Move the callback into the auth struct
Michael Tremer [Tue, 24 Jun 2025 16:14:03 +0000 (16:14 +0000)] 
client: Move the callback into the auth struct

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Move the tokens into the auth struct
Michael Tremer [Tue, 24 Jun 2025 16:13:06 +0000 (16:13 +0000)] 
client: Move the tokens into the auth struct

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Fire a timer just before the access token expires
Michael Tremer [Tue, 24 Jun 2025 16:10:51 +0000 (16:10 +0000)] 
client: Fire a timer just before the access token expires

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Move the authentication timer from the daemon
Michael Tremer [Tue, 24 Jun 2025 15:56:19 +0000 (15:56 +0000)] 
client: Move the authentication timer from the daemon

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Use the event loop from the HTTP client
Michael Tremer [Tue, 24 Jun 2025 15:55:40 +0000 (15:55 +0000)] 
client: Use the event loop from the HTTP client

The HTTP client needs to have more control so that it can automatically
terminate the event loop when it is done.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Remove the authentication framework
Michael Tremer [Tue, 24 Jun 2025 15:46:32 +0000 (15:46 +0000)] 
daemon: Remove the authentication framework

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Hold a reference to the event loop
Michael Tremer [Tue, 24 Jun 2025 15:46:03 +0000 (15:46 +0000)] 
client: Hold a reference to the event loop

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocli: Return auth result in exit code
Michael Tremer [Tue, 24 Jun 2025 15:34:04 +0000 (15:34 +0000)] 
cli: Return auth result in exit code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Actually call the authentication callback
Michael Tremer [Tue, 24 Jun 2025 15:33:44 +0000 (15:33 +0000)] 
client: Actually call the authentication callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Make user authentication asynchronous
Michael Tremer [Tue, 24 Jun 2025 15:27:53 +0000 (15:27 +0000)] 
client: Make user authentication asynchronous

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Implement an API response callback
Michael Tremer [Tue, 24 Jun 2025 15:21:13 +0000 (15:21 +0000)] 
xfer: Implement an API response callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Add a convenience function to run the standalone client
Michael Tremer [Tue, 24 Jun 2025 15:01:56 +0000 (15:01 +0000)] 
client: Add a convenience function to run the standalone client

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Add an authentication callback
Michael Tremer [Tue, 24 Jun 2025 15:01:15 +0000 (15:01 +0000)] 
client: Add an authentication callback

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Bring back an own HTTP client instance
Michael Tremer [Tue, 24 Jun 2025 14:49:00 +0000 (14:49 +0000)] 
client: Bring back an own HTTP client instance

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoconfigure: Drop dependency on libkrb5
Michael Tremer [Tue, 24 Jun 2025 14:33:58 +0000 (14:33 +0000)] 
configure: Drop dependency on libkrb5

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agodaemon: Remove Kerberos authentication
Michael Tremer [Tue, 24 Jun 2025 14:31:57 +0000 (14:31 +0000)] 
daemon: Remove Kerberos authentication

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Actually jump to the error block if JSON could not be parsed
Michael Tremer [Sat, 21 Jun 2025 18:16:15 +0000 (18:16 +0000)] 
json: Actually jump to the error block if JSON could not be parsed

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoclient: Rename the build service to client
Michael Tremer [Sat, 21 Jun 2025 18:14:13 +0000 (18:14 +0000)] 
client: Rename the build service to client

This is simply to have way shorter function names, because things have
started to become a little bit ridiculous. No functional changes.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Format transfer times in milliseconds
Michael Tremer [Sat, 21 Jun 2025 17:52:57 +0000 (17:52 +0000)] 
xfer: Format transfer times in milliseconds

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojenkins: Explicitely install autopoint on Debian-based distros
Michael Tremer [Sat, 21 Jun 2025 17:45:17 +0000 (17:45 +0000)] 
jenkins: Explicitely install autopoint on Debian-based distros

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojenkins: Explicitely install Gettext on all distros
Michael Tremer [Sat, 21 Jun 2025 17:38:06 +0000 (17:38 +0000)] 
jenkins: Explicitely install Gettext on all distros

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoconfigure: Explicitely configure Gettext
Michael Tremer [Sat, 21 Jun 2025 17:32:07 +0000 (17:32 +0000)] 
configure: Explicitely configure Gettext

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuildservice: Send all other API requests with a JSON payload
Michael Tremer [Sat, 21 Jun 2025 17:29:24 +0000 (17:29 +0000)] 
buildservice: Send all other API requests with a JSON payload

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Add function to add a boolean value
Michael Tremer [Sat, 21 Jun 2025 17:27:20 +0000 (17:27 +0000)] 
json: Add function to add a boolean value

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuildservice: Remove all dependencies to Kerberos
Michael Tremer [Sat, 21 Jun 2025 17:11:58 +0000 (17:11 +0000)] 
buildservice: Remove all dependencies to Kerberos

We will no longer use this for the API authentication.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuildservice: Automatically refresh the access token on expiry
Michael Tremer [Sat, 21 Jun 2025 17:09:24 +0000 (17:09 +0000)] 
buildservice: Automatically refresh the access token on expiry

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Accept a JSON request object to send as payload for API requests
Michael Tremer [Sat, 21 Jun 2025 17:07:14 +0000 (17:07 +0000)] 
xfer: Accept a JSON request object to send as payload for API requests

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuildservice: Implement uploads using the new API
Michael Tremer [Sat, 21 Jun 2025 16:51:43 +0000 (16:51 +0000)] 
buildservice: Implement uploads using the new API

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Send the appropriate content type header is sending JSON
Michael Tremer [Sat, 21 Jun 2025 16:51:09 +0000 (16:51 +0000)] 
xfer: Send the appropriate content type header is sending JSON

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuildservice: Implement authentication using the access token
Michael Tremer [Sat, 21 Jun 2025 16:49:41 +0000 (16:49 +0000)] 
buildservice: Implement authentication using the access token

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Align creating new JSON objects with other interfaces
Michael Tremer [Sat, 21 Jun 2025 16:35:12 +0000 (16:35 +0000)] 
json: Align creating new JSON objects with other interfaces

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Add a function to add a JSON request body
Michael Tremer [Sat, 21 Jun 2025 16:24:06 +0000 (16:24 +0000)] 
xfer: Add a function to add a JSON request body

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoJWT: Make the functions context-free
Michael Tremer [Sat, 21 Jun 2025 16:21:51 +0000 (16:21 +0000)] 
JWT: Make the functions context-free

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Cleanup the JSON parsing interfaces
Michael Tremer [Sat, 21 Jun 2025 16:16:55 +0000 (16:16 +0000)] 
json: Cleanup the JSON parsing interfaces

We should not always require the context to have some basic logging.
Instead we can return the error as a string.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Use the new string serialization function everywhere
Michael Tremer [Sat, 21 Jun 2025 15:57:39 +0000 (15:57 +0000)] 
json: Use the new string serialization function everywhere

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojson: Add a function to convert JSON to string
Michael Tremer [Sat, 21 Jun 2025 15:53:16 +0000 (15:53 +0000)] 
json: Add a function to convert JSON to string

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobase64: No longer require the input length
Michael Tremer [Sat, 21 Jun 2025 13:02:44 +0000 (13:02 +0000)] 
base64: No longer require the input length

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuildservice: Decode expiry times from access/refresh tokens
Michael Tremer [Sat, 21 Jun 2025 13:00:10 +0000 (13:00 +0000)] 
buildservice: Decode expiry times from access/refresh tokens

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoJWT: Normalize base64 data before decoding
Michael Tremer [Sat, 21 Jun 2025 12:59:41 +0000 (12:59 +0000)] 
JWT: Normalize base64 data before decoding

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobase64: Add function to normalize non-standard base64
Michael Tremer [Sat, 21 Jun 2025 12:59:17 +0000 (12:59 +0000)] 
base64: Add function to normalize non-standard base64

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agojwt: Add some simple functions to parse JWTs
Michael Tremer [Sat, 21 Jun 2025 12:38:53 +0000 (12:38 +0000)] 
jwt: Add some simple functions to parse JWTs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobase64: Allow specifying the length of the input buffer
Michael Tremer [Sat, 21 Jun 2025 12:32:33 +0000 (12:32 +0000)] 
base64: Allow specifying the length of the input buffer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agocli: Add a command to test user authentication against the API
Michael Tremer [Sat, 21 Jun 2025 11:48:00 +0000 (11:48 +0000)] 
cli: Add a command to test user authentication against the API

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuildservice: Add a function to authenticate a user against the API
Michael Tremer [Sat, 21 Jun 2025 11:47:29 +0000 (11:47 +0000)] 
buildservice: Add a function to authenticate a user against the API

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agobuildservice: Tell the API that we would like to receive JSON
Michael Tremer [Sat, 21 Jun 2025 11:46:36 +0000 (11:46 +0000)] 
buildservice: Tell the API that we would like to receive JSON

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Add a function to send a custom POST payload
Michael Tremer [Sat, 21 Jun 2025 11:46:00 +0000 (11:46 +0000)] 
xfer: Add a function to send a custom POST payload

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Add a function to set custom headers
Michael Tremer [Sat, 21 Jun 2025 11:45:35 +0000 (11:45 +0000)] 
xfer: Add a function to set custom headers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Add a function to URL escape any strings
Michael Tremer [Sat, 21 Jun 2025 11:44:58 +0000 (11:44 +0000)] 
xfer: Add a function to URL escape any strings

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 months agoxfer: Pass any numeric values as long
Michael Tremer [Sat, 21 Jun 2025 11:43:59 +0000 (11:43 +0000)] 
xfer: Pass any numeric values as long

cURL now complains if the value is not long.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoreadme: update bug report url
Rico Hoppe [Tue, 21 Jan 2025 12:05:32 +0000 (12:05 +0000)] 
readme: update bug report url

Signed-off-by: Rico Hoppe <rico.hoppe@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoxfer: Fix logic error in reading WebSocket messages
Michael Tremer [Sat, 3 May 2025 14:03:46 +0000 (14:03 +0000)] 
xfer: Fix logic error in reading WebSocket messages

After the message was read we never cleared the buffer which resulted
that on every message, the callback was called with the entire buffer.
Usually that meant that only the first JSON message was parsed and
handled. Again and again and again...

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>