Merge "authentication config: add optional max_validity_time, skew"

This commit is contained in:
Zuul
2019-12-20 19:41:10 +00:00
committed by Gerrit Code Review
7 changed files with 236 additions and 3 deletions

View File

@@ -540,7 +540,9 @@ class Client(zuul.cmd.ZuulApp):
print('"%s" authenticator configuration not found.'
% self.args.auth_config)
sys.exit(1)
token = {'exp': time.time() + self.args.expires_in,
now = time.time()
token = {'iat': now,
'exp': now + self.args.expires_in,
'iss': get_default(self.config, auth_section, 'issuer_id'),
'aud': get_default(self.config, auth_section, 'client_id'),
'sub': self.args.user,