"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/token/token_formatters.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).

token_formatters.py  (keystone-17.0.0):token_formatters.py  (keystone-18.0.0)
skipping to change at line 171 skipping to change at line 171
return token return token
def validate_token(self, token): def validate_token(self, token):
"""Validate a Fernet token and returns the payload attributes. """Validate a Fernet token and returns the payload attributes.
:type token: str :type token: str
""" """
serialized_payload = self.unpack(token) serialized_payload = self.unpack(token)
versioned_payload = msgpack.unpackb(serialized_payload) # TODO(melwitt): msgpack changed their data format in version 1.0, so
# in order to support a rolling upgrade, we must pass raw=True to
# support the old format. The try-except may be removed once the
# N-1 release no longer supports msgpack < 1.0.
try:
versioned_payload = msgpack.unpackb(serialized_payload)
except UnicodeDecodeError:
versioned_payload = msgpack.unpackb(serialized_payload, raw=True)
version, payload = versioned_payload[0], versioned_payload[1:] version, payload = versioned_payload[0], versioned_payload[1:]
for payload_class in _PAYLOAD_CLASSES: for payload_class in _PAYLOAD_CLASSES:
if version == payload_class.version: if version == payload_class.version:
(user_id, methods, system, project_id, domain_id, (user_id, methods, system, project_id, domain_id,
expires_at, audit_ids, trust_id, federated_group_ids, expires_at, audit_ids, trust_id, federated_group_ids,
identity_provider_id, protocol_id, access_token_id, identity_provider_id, protocol_id, access_token_id,
app_cred_id) = payload_class.disassemble(payload) app_cred_id) = payload_class.disassemble(payload)
break break
else: else:
 End of changes. 1 change blocks. 
1 lines changed or deleted 9 lines changed or added

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