summaryrefslogtreecommitdiff
path: root/types/protocol/protocol.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2023-04-13 15:25:42 +0200
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2023-09-25 09:43:37 +0200
commitf6f4396a81ce662eb5fb50c4f9fef92ffaadb333 (patch)
tree3e6b1c3ecc049c1aa377c8ca813f00b96437d2f3 /types/protocol/protocol.go
parent5610dca6c5e391ee62874c4d6cb25072d9c3c1d9 (diff)
All: Implement a token handler
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
Diffstat (limited to 'types/protocol/protocol.go')
0 files changed, 0 insertions, 0 deletions