Expand description
host.auth.* and host.affinity.lookup callbacks (internal/pluginhost/
auth_callbacks.go, affinity_callbacks.go): plugins read and save credentials and
observe session affinity through the host’s auth manager.
The server provides the manager (AuthManager, Go’s coreauth.Manager as the
plugin host uses it); without one, listing reads the auth directory and lookups
report the manager unavailable, as Go’s host does before SetAuthManager.
Structs§
- Host
Auth - A credential as the manager holds it (the Go
coreauth.Authfields the plugin host reads). - RpcHost
Auth GetRequest - RpcHost
Auth GetResponse - RpcHost
Auth List Response - Saved
Refresh - Where a saved plugin auth’s refresh deadlines come from (Go
preserveExistingAuthStateinbuildAuthsFromFileData): the registered auth it replaces (donor, GofindExistingAuthForSave), whoseLastRefreshedAtandNextRefreshAfterit takes, unset ones included; without one, theNextRefreshAfterits plugin parsed (the credential’s own). The manager applies them only once it registers the auth.
Enums§
- Saved
Auths - What
host.auth.saveregisters for the file it writes (GobuildAuthsFromFileData).
Traits§
- Auth
Manager - The server’s credential manager as the plugin host uses it.
Functions§
- build_
entry - Go
buildHostAuthFileEntry.Nonehides the credential: a disabled runtime-only one, one without a file that is not runtime-only, or a disabled or removed one whose file is gone. - write_
auth_ file os.WriteFile(path, data, 0o600): the error is Go’s*PathErrortext for the step that failed (open, write, then close).