summaryrefslogtreecommitdiff
path: root/internal/server/api.go
AgeCommit message (Collapse)Author
2023-02-28API + OAuth: Add some debug logging for tokensjwijenbergh
2023-02-16Server: Validate endpointsjwijenbergh
This commit validates the server endpoints by checking the Host and scheme of each URL to check if they match eachother. This is to prevent further mixup attacks
2023-01-13Server API: Set a lower timeout for disconnectjwijenbergh
2023-01-06Refactor: Re-use a HTTP clientjwijenbergh
2022-12-21Client + Exports: Forward tokens for /disconnectjwijenbergh
2022-12-12Server: Minor style changesjwijenbergh
2022-12-12simplify error handlingAleksandar Pesic
fixes #6 Signed-off-by: Aleksandar Pesic <peske.nis@gmail.com>
2022-11-28Refactor: Fix revive linter errors by deleting redundant prefixesjwijenbergh
2022-11-28OAuth: Refactor Token getting and do not save them in the configjwijenbergh
This commit refactors getting the tokens into receiver methods. This means that functions do not have to call the cryptic "EnsureTokens" method. The receiver getter then already verifier whether or not the tokens could be obtained (and refreshes too). The downside is that some things are now private, so testing for invalid tokens needs to be done somewhere else. This needs another patch such that clients can save the tokens themselves using a keyring.
2022-11-28Lint: Run godot fixjwijenbergh
Full command: golangci-lint run --disable-all -E godot --fix
2022-11-28Refactor: Remove most get prefixes for receiver functionsjwijenbergh
2022-11-24Style: Use stylecheck and fix errorsjwijenbergh
2022-10-19Refactor: Make errors use the parent's error leveljwijenbergh
- All wrapped errors have to be created with types.NewWrappedError to inherit the error level from the parent - Or types.NewWrappedErrorLevel can be used which means a custom error level is given. For example this is done with cancelling OAuth - Client public errors are forwarded with handleError that also logs it with the error's level
2022-10-19Discovery + Server: Remove unused 'Raw' stringsjwijenbergh
2022-10-13Server API: Use default timeout for /disconnectjwijenbergh
2022-10-04Server: Implement `prefer_tcp` according to specjwijenbergh
2022-09-26Refactor: Errors into custom export types and expose typesjwijenbergh
2022-09-20API: Append paths using path's Join methodjwijenbergh
2022-09-20Module: Move to eduvpn/eduvpn-commonjwijenbergh
2022-09-20Golang-ci-lint: Fixesjwijenbergh
2022-09-19API + HTTP: Set the /disconnect timeout to 1 secondjwijenbergh
2022-09-07Refactor: Remove the usage of the FSM in other internal packagesjwijenbergh
This removes the FSM from being imported and thus used in other internal packages such as `oauth` or `server`. The benefit is that it becomes much easier now to reason about the FSM as it's only used in the public package. Additionally, we do not have to re-initialize the server and the oauth structure with the FSM pointer.
2022-08-23Formatting: Run golinesjwijenbergh
2022-08-19Server: API disconnect should not retry authorizedjwijenbergh
2022-08-09Refactor: Cleanup time calculations and usagejwijenbergh
2022-07-20Refactor: Do not log in internal packagesjwijenbergh
The reason behind this is that we then do not have to pass a lot to each function. Logging inside internal packages is less useful as we want to let them return errors and only log in the 'public' facing API or let the client decide
2022-06-20Refactor: Errors to have one custom type that is to be wrappedjwijenbergh
- For this an `internal/types` package is created with a custom error type - This custom error type can give back the cause and traceback of an error
2022-09-20Server: Implement function for checking renewal button visibilityjwijenbergh