MCPcopy Index your code
hub / github.com/coder/coder / NewKeyringWithService

Function NewKeyringWithService

cli/sessionstore/sessionstore.go:114–119  ·  view source on GitHub ↗

NewKeyringWithService creates a Keyring Backend that stores credentials under the specified service name. Generally, DefaultServiceName should be provided as the service name except in tests which may need parameterization to avoid conflicting keyring use.

(serviceName string)

Source from the content-addressed store, hash-verified

112// specified service name. Generally, DefaultServiceName should be provided as the service
113// name except in tests which may need parameterization to avoid conflicting keyring use.
114func NewKeyringWithService(serviceName string) Keyring {
115 return Keyring{
116 provider: operatingSystemKeyring{},
117 serviceName: serviceName,
118 }
119}
120
121func (o Keyring) Read(serverURL *url.URL) (string, error) {
122 host, err := normalizeHost(serverURL)

Callers 4

setupKeyringTestEnvFunction · 0.92
ensureTokenBackendMethod · 0.92
TestKeyringFunction · 0.92

Calls

no outgoing calls

Tested by 3

setupKeyringTestEnvFunction · 0.74
TestKeyringFunction · 0.74