"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/token/providers/jws/core.py" between
keystone-17.0.0.tar.gz and keystone-18.0.0.tar.gz

About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Victoria" series (latest release).

core.py  (keystone-17.0.0):core.py  (keystone-18.0.0)
skipping to change at line 176 skipping to change at line 176
issued_at = self._convert_time_int_to_string(issued_at_int) issued_at = self._convert_time_int_to_string(issued_at_int)
expires_at = self._convert_time_int_to_string(expires_at_int) expires_at = self._convert_time_int_to_string(expires_at_int)
return ( return (
user_id, methods, audit_ids, system, domain_id, project_id, user_id, methods, audit_ids, system, domain_id, project_id,
trust_id, federated_group_ids, identity_provider_id, protocol_id, trust_id, federated_group_ids, identity_provider_id, protocol_id,
access_token_id, app_cred_id, issued_at, expires_at access_token_id, app_cred_id, issued_at, expires_at
) )
def _decode_token_from_id(self, token_id): def _decode_token_from_id(self, token_id):
options = dict()
options['verify_exp'] = False
for public_key in self.public_keys: for public_key in self.public_keys:
try: try:
return jwt.decode( return jwt.decode(
token_id, public_key, algorithms=JWSFormatter.algorithm token_id, public_key, algorithms=JWSFormatter.algorithm,
options=options
) )
except (jwt.InvalidSignatureError, jwt.DecodeError, except (jwt.InvalidSignatureError, jwt.DecodeError):
jwt.ExpiredSignatureError):
pass # nosec: We want to exhaustively try all public keys pass # nosec: We want to exhaustively try all public keys
raise exception.TokenNotFound(token_id=token_id) raise exception.TokenNotFound(token_id=token_id)
def _convert_time_string_to_int(self, time_str): def _convert_time_string_to_int(self, time_str):
time_object = timeutils.parse_isotime(time_str) time_object = timeutils.parse_isotime(time_str)
normalized = timeutils.normalize_time(time_object) normalized = timeutils.normalize_time(time_object)
epoch = datetime.datetime.utcfromtimestamp(0) epoch = datetime.datetime.utcfromtimestamp(0)
return int((normalized - epoch).total_seconds()) return int((normalized - epoch).total_seconds())
def _convert_time_int_to_string(self, time_int): def _convert_time_int_to_string(self, time_int):
 End of changes. 3 change blocks. 
3 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)