Commit Graph

25 Commits

Author SHA1 Message Date
Jordan Dominion 3c46164515 ThrowsExactly conversion except harder 2025-08-01 19:37:43 -04:00
Jordan Dominion aee7043a98 Remove unused usings 2025-03-15 11:45:45 -04:00
Jordan Dominion 869092f6c1 Add integration tests for /health and /metrics 2025-02-16 20:45:29 -05:00
Jordan Dominion a1bf9310c8 Fix another graphQL test 2024-10-11 11:26:43 -04:00
Jordan Dominion 4cad4e0f45 Fix issues with login result fields being null 2024-10-06 22:18:40 -04:00
Jordan Dominion f37883a438 Hopefully fix issues with auth pipeline for good 2024-09-21 10:58:17 -04:00
Jordan Dominion c9c24a5dbf Flesh out GraphQL client 2024-09-17 20:12:25 -04:00
Jordan Dominion ff262b2584 Improve LoginPayload 2024-09-14 14:54:54 -04:00
Jordan Dominion 0c34ff1dbc Apply code suggestions 2024-09-14 10:16:41 -04:00
Jordan Dominion 0f5841a2fb Fix RawRequestTests assertions 2024-09-14 09:13:24 -04:00
Jordan Dominion a5b4afbde6 Add a basic GQL errored login test 2024-09-10 23:59:57 -04:00
Jordan Dominion d89461d19d GraphQL API Initial Implementation
- Build API via annotations using HotChocolate.
  - Export to `artifacts` on build.
  - Repurpose REST API types where possible, but many have to be reimplemented.
  - Transfer controller and bridge controller will definitely have to stay forever.
- Added `Tgstation.Server.Client.GraphQL` built from schema using StrawberryShake.
  - Added equivalent server information query.
- Setup semver and u32 (de)serialization.
- Begin transitioning to multi-client type live tests.
- Add GraphQL route `/api/graphql`
- Rename ServerClient likes to RestServerClient equivalent.
- Major API/Client library version bumps.
2024-09-08 20:51:04 -04:00
Jordan Dominion bd1deb0a9b Add 30 minute cache to GitHub releases requests
Closes #1831
2024-08-10 17:38:27 -04:00
Jordan Dominion a4bf9e409b Remove deprecated API fields
Closes #1718
2023-11-17 11:02:11 -05:00
Jordan Dominion 9e1806a2b4 Move all API functionality to /api.
Move `BridgeController` route but BYOND forces us to support the legacy one as well.
Add a basic homepage if it's not obvious where to redirect the user.

Closes #1689
2023-11-10 23:18:20 -05:00
Jordan Dominion 90d41cc88d Replace HTTP 426 with 400
Notable exception is the swarm API, which still uses 426 for version mismatches and would be a pain in the ass to change correctly.

Closes #1693
2023-11-06 17:56:03 -05:00
Jordan Dominion 5f6e3d340c Merge branch 'dev' into V6 2023-11-06 17:37:48 -05:00
Jordan Dominion ed8453f08e Remove hub abort notifications
Because SignalR buffers messages, we can't guarantee these will be delivered before the connection is aborted.

We'll have to rely on the client not being pants-on-head.
2023-11-05 09:38:57 -05:00
Jordan Dominion d85e2b8d36 Add SignalR
- Add one hub `/hubs/jobs`, strongly typed API included.
- Adjust request pipeline to support SignalR.
- Allow `Accept: text/event-stream` for SSE requests.
- Add client library support for hubs.
- Add integration tests.
- Add IPermissionSetNotifyee to support dynamic changes based on perms.
- Keep job state in `JobService` for pushing updates.
2023-11-04 19:22:48 -04:00
Jordan Dominion d851df8276 GET / with an Authorization header should fail if it's not valid 2023-11-02 23:10:34 -04:00
Jordan Dominion 29579a351d Fix JWT compliance issues.
- `nbf` and `exp` should be numbers, not strings.
- Parse JWT in `ApiHeaders` fully for errors.
- Use `iat` and increment `nbf` by one second if equal and may trigger the `LastPasswordUpdate` bug.
  - Make client aware of this change and move the delay there.
- Deprecated `TokenResponse.ExpiresAt`.
2023-10-31 23:16:18 -04:00
Jordan Dominion 3b6f4e947a Merge branch 'dev' into ValueTasks 2023-08-13 23:36:21 -04:00
Jordan Dominion 2e6e2841e5 Add support for changing console title
- Move `VersionExtensions` to `Tgstation.Server.Common`.
- Fix Host watchdog API version specifying `Revision`.
2023-07-02 09:13:27 -04:00
Dominion 4471391b96 ValueTask Tgstation.Server.Client 2023-06-14 12:30:00 -04:00
Dominion 8ab819a414 Reorganize integration tests 2023-04-22 10:27:52 -04:00