| Age | Commit message (Collapse) | Author |
|
This is for V1 configs
|
|
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
|
|
|
|
Used as a specialized context in state callbacks and for cancellation
|
|
|
|
- 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
|
|
|
|
|
|
It is already contained in the profiles map as the key
|
|
|
|
|
|
|
|
|
|
|
|
fixes #6
Signed-off-by: Aleksandar Pesic <peske.nis@gmail.com>
|
|
|
|
Full command: golangci-lint run --disable-all -E godot --fix
|
|
|
|
|
|
- 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
|
|
|
|
|
|
|