summaryrefslogtreecommitdiff
path: root/types
AgeCommit message (Collapse)Author
2023-09-25Server: Support unmarshalling server as a stringjwijenbergh
This is for V1 configs
2023-09-25All: Implement a token handlerjwijenbergh
This implements a token handler for OAuth tokens. Clients can use the SetTokenHandler function in exports to set a token handler. It needs two arguments, a getter and a setter. The getter is a callback with three arguments: - The server to get the tokens for, in types.server.current as JSON - The output buffer - The output buffer maximum length The tokens should be written to the output buffer with maximum length. The type should be types.server.Tokens and be marshalled as JSON. If no tokens are available, leave the output buffer intact The token setter is a callback with two arguments: - The server for which to set the tokens for, in types.server.Current as JSON - The tokens, defined in types.server.Tokens as JSON Breaking changes: - No more tokens as arguments, was already deprecated in previous commits - Tokens are no longer returned in types.server.Configuration
2023-09-25Types Server: Implement required ask transition needed for clientjwijenbergh
2023-09-25Types: Add a new cookie typejwijenbergh
Used as a specialized context in state callbacks and for cancellation
2023-09-25Types Server: Pass locations to secure internetjwijenbergh
2023-09-25Exports + Client: Refactor registering a clientjwijenbergh
- Make sure the global exports state is only set on successful creating - Only call discovery when adding a server to ensure we get the most up to date args. Creating a client should have no network calls. Fixes #12 - Split creating a client in New and Register in the GO api
2023-09-25Docs + Types server: Add comments about script-securityjwijenbergh
2023-09-25Types: Add comments describing the fields, types, packages and functionsjwijenbergh
2023-09-25Types Server: Remove identifier from profilejwijenbergh
It is already contained in the profiles map as the key
2023-09-25Types: Split server into subpackagejwijenbergh
2023-09-25Types: Split discovery into its own packagejwijenbergh
2023-09-25Format: Run gofumptjwijenbergh
2023-09-25Types: Split protocol into its ownjwijenbergh
2023-09-25Types: Move public types to one filejwijenbergh
2022-12-12simplify error handlingAleksandar Pesic
fixes #6 Signed-off-by: Aleksandar Pesic <peske.nis@gmail.com>
2022-11-28Lint: Use gocritic linter and fix errors returned by itjwijenbergh
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-09-27Log: Add 'inherit' that sets the error level as the log leveljwijenbergh
2022-09-26Refactor: Errors into custom export types and expose typesjwijenbergh