D. Berge
b48a060dc0
Don't cache comparisons in the API
2025-08-22 16:01:20 +02:00
D. Berge
619a886781
Add comparison API endpoints
2025-08-22 16:01:20 +02:00
D. Berge
24dcebd0d9
Remove logging statements
2025-08-17 13:17:22 +02:00
D. Berge
b3552db02f
Add error checking to ETag logic
2025-08-16 11:36:43 +02:00
D. Berge
764e2cfb23
Rename endpoint
2025-08-14 13:34:36 +02:00
D. Berge
bf1af1f76c
Make it explicit that :id is numeric
2025-08-14 13:34:27 +02:00
D. Berge
09e4cd2467
Add CSV event import.
...
Closes #336
2025-08-14 13:33:30 +02:00
D. Berge
083ee812de
Use cookies for authentication as a last resort.
...
Fixes #335
2025-08-13 16:54:38 +02:00
D. Berge
84510e8dc9
Add proper logging
2025-08-13 15:42:49 +02:00
D. Berge
a5ebff077d
Fix authentication middleware erroring on IPv6
2025-08-13 11:50:20 +02:00
D. Berge
8c81daefc0
Move the two /configuration endpoints next to each other
2025-08-11 22:20:46 +02:00
D. Berge
c173610e87
Simplify middleware
2025-08-11 22:19:51 +02:00
D. Berge
301e5c0731
Set headers only on 304
2025-08-11 22:06:51 +02:00
D. Berge
48d9f45fe0
Clean up debug messages
2025-08-11 22:06:20 +02:00
D. Berge
02477b071b
Compress across the board.
...
It's still subject to the compression module's filters, but now
we try to compress every response in principle.
2025-08-11 13:57:11 +02:00
D. Berge
6651868ea7
Enable compression for vessel track responses
2025-08-11 13:40:53 +02:00
D. Berge
c0b52a8245
Be more aggressive about what gets compressed
2025-08-11 12:42:48 +02:00
D. Berge
aabcc74891
Add compression to some endpoints.
...
Consideration will be given to adding (conditional) compression
to all endpoints.
2025-08-11 01:53:50 +02:00
D. Berge
acdf118a67
Add new /vessel/track endpoints.
...
This is a variation on /navdata but returns data more suitable
for plotting vessel tracks on the map.
2025-08-10 21:39:35 +02:00
D. Berge
ae8e5d4ef6
Do not use cookies for backend authentication
2025-08-09 12:43:17 +02:00
D. Berge
07874ffe0b
Filter missing values out of JSON data for binary packing
2025-08-08 12:15:39 +02:00
D. Berge
94cdf83b13
Change access permissions to files endpoints
2025-08-07 16:23:55 +02:00
D. Berge
a15c97078b
Fix typo in access middleware
2025-08-07 10:41:29 +02:00
D. Berge
be5c6f1fa3
Fix user authentication.
...
* Use X-JWT header for sending authentication info
both from server to client and from client to server.
* Send token in body of login response.
* Also use Set-Cookie: JWT=… so that calls that are
not issued directly by Dougal (e.g. Deck.gl layers
with a URL `data` property) work without having to
jump through hoops.
Closes #321
2025-08-06 10:21:37 +02:00
D. Berge
c376896ea6
Also serve preplot source/sail points as binary.
...
This commit adds the ability to pack preplot points in Dougal
binary format. Sail line points take udv=0 and source line points
take udv=1 – udv=2 remains sequence data.
Endpoints for retrieving the data in JSON, GeoJSON and binary
formats have also been added. Data may be retrieved as a single
line or for a whole project.
2025-08-03 11:17:31 +02:00
D. Berge
ad013ea642
Add additional formats for sequence list endpoint.
...
The original and default "Accept: application/json" will return
a sequence summary.
"Accept: application/geo+json" will return a GeoJSON of the
entire project.
"Accept: application/vnd.aaltronav.dougal+octet-stream" will
return the entire project in Dougal's binary format.
2025-08-01 17:07:37 +02:00
D. Berge
4be99370e6
Change the MIME type of binary responses
2025-08-01 16:50:32 +02:00
D. Berge
e464f5f887
Refactor code handling binary sequence requests.
...
Instead of the user giving the recipe for the payload, it now
only handles predefined payload configurations. Those are
denoted by the `type` query parameter. The only valid value
as of this commit is `type=2`.
Look at lib/binary/bundle.js for the definition of a type 2
bundle.
2025-08-01 16:47:50 +02:00
D. Berge
3bb78040b0
Set correct Content-Type
2025-07-28 10:06:21 +02:00
D. Berge
808c9987af
Add binary format middleware for sequence data.
...
It responds to the MIME type:
application/dougal-map-sequence+octet-stream
2025-07-26 19:05:00 +02:00
D. Berge
a58cce8565
Add /version/history endpoint to API.
...
Retrieves Git tag annotations.
2025-07-26 10:58:42 +02:00
D. Berge
5487a3a49b
Catch JWT expiration.
...
Closes #321
2025-07-26 10:56:23 +02:00
D. Berge
0b3711b759
Fix typo
2025-07-25 20:08:08 +02:00
D. Berge
48e1369088
Fix host based authentication
2025-07-25 14:03:43 +02:00
D. Berge
3ea82cb660
Fix reading of credentials for issuing JWT
2025-07-24 23:03:05 +02:00
D. Berge
84c1385f88
Refactor class User (clean up)
2025-07-24 23:02:30 +02:00
D. Berge
386fd59900
Update API to handle permissions checks on most endpoints
2025-07-24 19:24:40 +02:00
D. Berge
e47020a21e
Add /user endpoints to API
2025-07-24 19:23:43 +02:00
D. Berge
b8f58ac67c
Add FIXME
2025-07-24 19:20:58 +02:00
D. Berge
b3e27ed1b9
Refactor auth.authentify.
...
We now get the user's details directly from the JWT token.
2025-07-24 19:15:36 +02:00
D. Berge
f5441d186f
Refactor auth.access middleware.
...
It users @dougal/user and @dougal/organisations classes.
2025-07-24 19:14:19 +02:00
D. Berge
01d1691def
Fix login endpoint (checkValidCredentials is now async)
2025-07-24 19:09:39 +02:00
D. Berge
2657c42dcc
Fix export statement
2025-07-13 11:13:31 +02:00
D. Berge
d6fb7404b1
Adapt version.get middleware to new permissions approach
2025-07-13 00:07:52 +02:00
D. Berge
8188766a81
Refactor access to info table.
...
To adapt to new permissions system.
2025-07-13 00:07:05 +02:00
D. Berge
b7ae657137
Add auth.operations middleware.
...
Adds an array of allowed operations on given context to the request
under `req.user.operations`.
2025-07-13 00:02:48 +02:00
D. Berge
7c6d3fe5ee
Check permissions against vessel if not on a project endpoint
2025-07-12 16:49:10 +02:00
D. Berge
55855d66e9
Remove dead code
2025-07-12 12:14:12 +02:00
D. Berge
b035d3481c
Ensure users have at least read access to most endpoints
2025-07-11 22:49:28 +02:00
D. Berge
ca4a14ffd9
Use new orgs based method for authorisation
2025-07-11 22:48:44 +02:00