MCPcopy Create free account
hub / github.com/Scalingo/cli / SetCurrentUser

Function SetCurrentUser

config/auth.go:68–75  ·  view source on GitHub ↗
(ctx context.Context, user *scalingo.User, token string)

Source from the content-addressed store, hash-verified

66}
67
68func SetCurrentUser(ctx context.Context, user *scalingo.User, token string) error {
69 authenticator := &CliAuthenticator{}
70 err := authenticator.StoreAuth(ctx, user, token)
71 if err != nil {
72 return errors.Wrapf(ctx, err, "store credentials")
73 }
74 return nil
75}
76
77func (a *CliAuthenticator) StoreAuth(ctx context.Context, user *scalingo.User, token string) error {
78 authConfig, err := existingAuth(ctx)

Callers 2

finalizeLoginFunction · 0.92
AuthFunction · 0.85

Calls 1

StoreAuthMethod · 0.95

Tested by

no test coverage detected