MCPcopy Create free account
hub / github.com/cli/cli / loginRefreshableWithExpiry

Function loginRefreshableWithExpiry

pkg/cmd/auth/token/token_test.go:510–519  ·  view source on GitHub ↗
(t *testing.T, c gh.Config, hostname, username, accessToken, refreshToken string, secureStorage bool, expiresAt *time.Time)

Source from the content-addressed store, hash-verified

508}
509
510func loginRefreshableWithExpiry(t *testing.T, c gh.Config, hostname, username, accessToken, refreshToken string, secureStorage bool, expiresAt *time.Time) {
511 t.Helper()
512 authCfg := c.Authentication().(*config.AuthConfig)
513 _, err := authCfg.LoginRefreshable(hostname, username, gh.Credential{
514 Token: accessToken,
515 RefreshToken: refreshToken,
516 ExpiresAt: expiresAt,
517 }, "https", secureStorage)
518 require.NoError(t, err)
519}
520
521func setRefresher(t *testing.T, c gh.Config, r gh.TokenRefresher) {
522 t.Helper()

Callers 2

loginRefreshableFunction · 0.70
TestTokenRunRefreshFunction · 0.70

Calls 3

HelperMethod · 0.65
AuthenticationMethod · 0.65
LoginRefreshableMethod · 0.65

Tested by

no test coverage detected