Skip to main content

Module auth

Module auth 

Source
Expand description

Auth provider and frontend auth capabilities (internal/pluginhost/auth_provider.go, adapters_auth.go).

A plugin auth is a PluginAuth: Go’s coreauth.Auth fields that plugins set, with its storage (pluginTokenStorage) as raw JSON merged with metadata on save. The server maps it onto its credential store.

Structs§

AuthView
An existing credential as the plugin sees it (Go coreauth.Auth read side).
FrontendAuthOutcome
A frontend request a plugin accepted (Go sdkaccess.Result).
ParseAuthsResult
Go ParseAuths’ ([]*Auth, handled, error).
PluginAuth
Go coreauth.Auth as a plugin produces it.

Constants§

ATTRIBUTE_FILE_PRIORITY
ATTRIBUTE_PATH
ATTRIBUTE_SOURCE
ATTRIBUTE_SOURCE_BACKEND
AUTH_SOURCE_FILE

Functions§

atomic_write
Go atomicWriteFile: a 0600 temp file beside path, renamed over it.
auth_id_for_path
Go authIDForPath: relative to the auth dir when inside it, slash-separated.
canonical_metadata_key
Go CanonicalCredentialMetadataKey.
normalize_credential_metadata
Go NormalizeCredentialMetadata: legacy keys move to their canonical name unless the canonical one is already present.
refreshed_auth_data
Go RefreshAuth’s defaults: the refreshed record inherits what the plugin left out.