summaryrefslogtreecommitdiff
path: root/internal
AgeCommit message (Collapse)Author
2022-11-28Linter: Fix dupword errorsjwijenbergh
2022-11-28Log: Fix copy&paste function commentsjwijenbergh
2022-11-28Log: Define f prefix for log functions to indicate printf likejwijenbergh
2022-11-28OAuth: Define ReadHeaderTimeoutjwijenbergh
2022-11-28OAuth Listener: Explicitly specify localhostjwijenbergh
2022-11-28Formatting: Run golinesjwijenbergh
2022-11-28Formatting: Run gofumpt -wjwijenbergh
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-28Document: Add comments for most functions and packagesjwijenbergh
Errors and test files still need to be done. Also some getters are changed by removing the 'get' prefix
2022-11-25Discovery + Exports: Rename variable to not clash with server pkgjwijenbergh
2022-11-24Style: Use stylecheck and fix errorsjwijenbergh
2022-11-24Discovery + Server: Get rid of unused importsjwijenbergh
2022-11-24Util: Get rid of current time helperjwijenbergh
Fixes #5
2022-11-23FSM: Check unhandled transitionsjwijenbergh
2022-11-17Log: Rename log file to logjwijenbergh
2022-11-17Log: Add additional params to get rid of Sprintf callsjwijenbergh
2022-11-14Client + Server: Refresh the endpoints before checking for a valid profilejwijenbergh
2022-11-10HTTP: Fix typo in status errorjwijenbergh
2022-11-10Logging: Add a Debug leveljwijenbergh
This makes the levels more logical
2022-11-10Server: Re-initialize endpoints when getting a configjwijenbergh
2022-10-25Client + FSM: Remove background argument from transitionjwijenbergh
This fixes a race condition reported by Go's -race flag In the future we should use waitgroups to ensure the OAuth local listener is started before we sent the URL
2022-10-25Verify Test: Fix ugly race condition found with Go's -race flagjwijenbergh
2022-10-24Log: Rename log file to go.logjwijenbergh
2022-10-24Log: Use a multiwriter and make output neaterjwijenbergh
2022-10-24Client + Server + Exports: Implement optional WireGuard supportjwijenbergh
2022-10-19OAuth + Server: Fix ISS for secure internetjwijenbergh
The wrong base url was used. Use the one from the home server NOT the current location
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-18OAuth: Do not use url.Values Has(), only use Get()jwijenbergh
Has() was only added in Go 1.17
2022-10-17Client + Server: Delete tokens before attempting a login for renewjwijenbergh
2022-10-17Server + Util: Ensure the base URL already ends with a /jwijenbergh
2022-10-17OAuth: Use values Has and Get functions and check state after ISSjwijenbergh
2022-10-17OAuth: Implement Authorization Server Issuer Identification (ISS)jwijenbergh
- This patch implements ISS checking according to RFC 9207 https://datatracker.ietf.org/doc/html/rfc9207 - This tries to prevent so called "mix-up" attacks where the client is fooled into authorizing with an honest AS through a malicious entity
2022-10-13OAuth: Add a TODO note about ISSjwijenbergh
2022-10-13OAuth: Wrap template errorsjwijenbergh
2022-10-13OAuth: Return HTML response on authorizedjwijenbergh
HTML Template adapted from: https://github.com/eduvpn/apple/blob/5b18f834be7aebfed00570ae0c2f7bcbaf1c69cc/EduVPN/Helpers/Mac/OAuthRedirectHTTPHandler.m#L25
2022-10-13Server API: Use default timeout for /disconnectjwijenbergh
2022-10-13Format: Run gofumptjwijenbergh
2022-10-13Client + Config + FSM: Simplify file namesjwijenbergh
2022-10-11Client + Server: Set the current institute / custom server on addingjwijenbergh
2022-10-11Client: Refactor out adding a Server from getting a configjwijenbergh
2022-10-06OAuth: Use an available port instead of the hard-coded 8000jwijenbergh
2022-10-04Util Test: Remove function signature commentjwijenbergh
2022-10-04Server: Implement `prefer_tcp` according to specjwijenbergh
2022-10-04Refactor: Renmae force TCP to prefer TCPjwijenbergh
2022-09-27Log: Add 'inherit' that sets the error level as the log leveljwijenbergh
2022-09-26OAuth: Verifier and State docs improvementjwijenbergh