| Age | Commit message (Collapse) | Author |
|
fixes #6
Signed-off-by: Aleksandar Pesic <peske.nis@gmail.com>
|
|
Minor changes from PR #9
Co-authored-by: fkooman <fkooman@tuxed.net>
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
Full command: golangci-lint run --disable-all -E godot --fix
|
|
|
|
Errors and test files still need to be done. Also some getters are
changed by removing the 'get' prefix
|
|
|
|
Fixes #5
|
|
The wrong base url was used. Use the one from the home server NOT the
current location
|
|
- 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
|
|
Has() was only added in Go 1.17
|
|
|
|
- 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
|
|
|
|
|
|
HTML Template adapted from: https://github.com/eduvpn/apple/blob/5b18f834be7aebfed00570ae0c2f7bcbaf1c69cc/EduVPN/Helpers/Mac/OAuthRedirectHTTPHandler.m#L25
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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
|
|
|
|
- Uses OrgID for Secure Internet and gets the data from discovery
- Uses URL for Institute/Custom and gets the data from discovery
- Implements SKIP WAYF as we now have the needed data
- Implements an initial change location with a default location (NL right now)
|
|
- 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
|
|
|