Fix some missing Period statements in recently tokenutilified auth method renewal funcs

This commit is contained in:
Jeff Mitchell 2019-07-01 19:36:27 -04:00
parent 3acf65ae12
commit 81770a4fe5
5 changed files with 5 additions and 0 deletions

View File

@ -123,6 +123,7 @@ func (b *backend) pathLoginRenew(ctx context.Context, req *logical.Request, d *f
}
resp := &logical.Response{Auth: req.Auth}
resp.Auth.Period = verifyResp.Config.TokenPeriod
resp.Auth.TTL = verifyResp.Config.TokenTTL
resp.Auth.MaxTTL = verifyResp.Config.TokenMaxTTL

View File

@ -134,6 +134,7 @@ func (b *backend) pathLoginRenew(ctx context.Context, req *logical.Request, d *f
}
resp.Auth = req.Auth
resp.Auth.Period = cfg.TokenPeriod
resp.Auth.TTL = cfg.TokenTTL
resp.Auth.MaxTTL = cfg.TokenMaxTTL

View File

@ -131,6 +131,7 @@ func (b *backend) pathLoginRenew(ctx context.Context, req *logical.Request, d *f
}
resp.Auth = req.Auth
resp.Auth.Period = cfg.TokenPeriod
resp.Auth.TTL = cfg.TokenTTL
resp.Auth.MaxTTL = cfg.TokenMaxTTL

View File

@ -147,6 +147,7 @@ func (b *backend) pathLoginRenew(ctx context.Context, req *logical.Request, d *f
return nil, fmt.Errorf("policies have changed, not renewing")
}
req.Auth.Period = cfg.TokenPeriod
req.Auth.TTL = cfg.TokenTTL
req.Auth.MaxTTL = cfg.TokenMaxTTL
return &logical.Response{Auth: req.Auth}, nil

View File

@ -140,6 +140,7 @@ func (b *backend) pathLoginRenew(ctx context.Context, req *logical.Request, d *f
}
resp := &logical.Response{Auth: req.Auth}
resp.Auth.Period = user.TokenPeriod
resp.Auth.TTL = user.TokenTTL
resp.Auth.MaxTTL = user.TokenMaxTTL
return resp, nil