def assertion_jwt(cli, keys, audience, algorithm): _now = utc_now() at = AuthnToken(iss=cli.client_id, sub=cli.client_id, aud=audience, jti=rndstr(8), exp=_now + 600, iat=_now) return at.to_jwt(key=keys, algorithm=algorithm)
def assertion_jwt(cli, keys, audience, algorithm, lifetime=600): _now = utc_time_sans_frac() at = AuthnToken(iss=cli.client_id, sub=cli.client_id, aud=audience, jti=rndstr(32), exp=_now + lifetime, iat=_now) return at.to_jwt(key=keys, algorithm=algorithm)
def assertion_jwt(cli, keys, audience, algorithm, lifetime=600): _now = utc_time_sans_frac() at = AuthnToken(iss=cli.client_id, sub=cli.client_id, aud=audience, jti=rndstr(16), exp=_now + lifetime, iat=_now) return at.to_jwt(key=keys, algorithm=algorithm)
def assertion_jwt(cli, keys, audience, algorithm): _now = time.time() at = AuthnToken(iss=cli.client_id, sub=cli.client_id, aud=audience, jti=rndstr(8), exp=_now + 600, iat=_now) return at.to_jwt(key=keys, algorithm=algorithm)