MCPcopy Create free account
hub / github.com/basecamp/hey-cli / IsAuthenticated

Method IsAuthenticated

internal/auth/auth.go:123–133  ·  view source on GitHub ↗

IsAuthenticated checks if there are valid credentials.

()

Source from the content-addressed store, hash-verified

121
122// IsAuthenticated checks if there are valid credentials.
123func (m *Manager) IsAuthenticated() bool {
124 if os.Getenv("HEY_TOKEN") != "" {
125 return true
126 }
127
128 creds, err := m.store.Load(m.baseURL)
129 if err != nil {
130 return false
131 }
132 return creds.AccessToken != "" || creds.SessionCookie != ""
133}
134
135// LoginOptions configures the login flow.
136type LoginOptions struct {

Callers 4

TestIsAuthenticatedFunction · 0.80
newSetupCommandFunction · 0.80
requireAuthFunction · 0.80
runDoctorChecksFunction · 0.80

Calls 1

LoadMethod · 0.80

Tested by 1

TestIsAuthenticatedFunction · 0.64