Merge pull request #4729 from hashicorp/backport/alanknight_clientcache_retrylimit/hugely-whole-collie

This pull request was automerged via backport-assistant
pull/4732/head
hc-github-team-secure-boundary 2 years ago committed by GitHub
commit b0d1cb2773
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -26,10 +26,13 @@ type ResolvableAliasRetrievalFunc func(ctx context.Context, addr, authTok, userI
func defaultResolvableAliasFunc(ctx context.Context, addr, authTok, userId string, refreshTok RefreshTokenValue) ([]*aliases.Alias, []string, RefreshTokenValue, error) {
const op = "cache.defaultResolvableAliasFunc"
client, err := api.NewClient(&api.Config{
Addr: addr,
Token: authTok,
})
conf, err := api.DefaultConfig()
if err != nil {
return nil, nil, "", errors.Wrap(ctx, err, op)
}
conf.Addr = addr
conf.Token = authTok
client, err := api.NewClient(conf)
if err != nil {
return nil, nil, "", errors.Wrap(ctx, err, op)
}

@ -25,10 +25,13 @@ type SessionRetrievalFunc func(ctx context.Context, addr, authTok string, refres
func defaultSessionFunc(ctx context.Context, addr, authTok string, refreshTok RefreshTokenValue) ([]*sessions.Session, []string, RefreshTokenValue, error) {
const op = "cache.defaultSessionFunc"
client, err := api.NewClient(&api.Config{
Addr: addr,
Token: authTok,
})
conf, err := api.DefaultConfig()
if err != nil {
return nil, nil, "", errors.Wrap(ctx, err, op)
}
conf.Addr = addr
conf.Token = authTok
client, err := api.NewClient(conf)
if err != nil {
return nil, nil, "", errors.Wrap(ctx, err, op)
}

@ -25,10 +25,13 @@ type TargetRetrievalFunc func(ctx context.Context, addr, authTok string, refresh
func defaultTargetFunc(ctx context.Context, addr, authTok string, refreshTok RefreshTokenValue) ([]*targets.Target, []string, RefreshTokenValue, error) {
const op = "cache.defaultTargetFunc"
client, err := api.NewClient(&api.Config{
Addr: addr,
Token: authTok,
})
conf, err := api.DefaultConfig()
if err != nil {
return nil, nil, "", errors.Wrap(ctx, err, op)
}
conf.Addr = addr
conf.Token = authTok
client, err := api.NewClient(conf)
if err != nil {
return nil, nil, "", errors.Wrap(ctx, err, op)
}

Loading…
Cancel
Save