)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"2add7a8ee15e26c506d68230dc599b018a89e380","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Consolidate the fernet provider issue_v2_token()"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When the Fernet token provider was implemented, it extended the"},{"line_number":10,"context_line":"provider.common.py:BaseProvider class. It also overrode most all common methods"},{"line_number":11,"context_line":"the BaseProvider implemented. Other token providers in Keystone (like the UUID"},{"line_number":12,"context_line":"an PKI providers) just implement a _get_token_id method because token ids may"},{"line_number":13,"context_line":"be different across providers."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"9a1a9d01_a5ac65ee","line":10,"updated":"2015-09-24 18:41:22.000000000","message":"nit: \"most of all\" ?","commit_id":"3240fa30eb932d51f51f6022fff10d2d0549f9d5"}],"keystone/token/providers/common.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1a029bf00593f75d851d2fb27aecbbb8d19f1549","unresolved":false,"context_lines":[{"line_number":479,"context_line":"    def issue_v2_token(self, token_ref, roles_ref\u003dNone,"},{"line_number":480,"context_line":"                       catalog_ref\u003dNone):"},{"line_number":481,"context_line":"        if token_ref.get(\u0027bind\u0027) and not self._supports_bind_authentication:"},{"line_number":482,"context_line":"            raise exception.NotImplemented()"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"        metadata_ref \u003d token_ref[\u0027metadata\u0027]"},{"line_number":485,"context_line":"        trust_ref \u003d None"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_e8f7f5d0","line":482,"updated":"2015-07-28 16:14:10.000000000","message":"nit: include a more specific message as an argument to the exception about what\u0027s not implemented so that something more useful than a generic 501 is returned to the client","commit_id":"ab6548a9d06f83a1662ad9fff5abb8d251c8de74"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1ddd0b1e4440ca9b9ac7de61b639c9b52af3fb98","unresolved":false,"context_lines":[{"line_number":479,"context_line":"    def issue_v2_token(self, token_ref, roles_ref\u003dNone,"},{"line_number":480,"context_line":"                       catalog_ref\u003dNone):"},{"line_number":481,"context_line":"        if token_ref.get(\u0027bind\u0027) and not self._supports_bind_authentication:"},{"line_number":482,"context_line":"            raise exception.NotImplemented()"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"        metadata_ref \u003d token_ref[\u0027metadata\u0027]"},{"line_number":485,"context_line":"        trust_ref \u003d None"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_46945843","line":482,"in_reply_to":"3a50d1a3_e8f7f5d0","updated":"2015-07-30 21:10:08.000000000","message":"Done","commit_id":"ab6548a9d06f83a1662ad9fff5abb8d251c8de74"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"bee943641b8a2fb4c2682032e9635c398d2ade34","unresolved":false,"context_lines":[{"line_number":531,"context_line":"            trust_ref \u003d self.trust_api.get_trust(metadata_ref[\u0027trust_id\u0027])"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"        token_data \u003d self.v2_token_data_helper.format_token("},{"line_number":534,"context_line":"            token_ref, roles_ref, catalog_ref, trust_ref)"},{"line_number":535,"context_line":"        token_id \u003d self._get_token_id(token_data)"},{"line_number":536,"context_line":"        token_data[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] \u003d token_id"},{"line_number":537,"context_line":"        return token_id, token_data"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_7d67ac25","line":534,"updated":"2015-08-23 14:13:31.000000000","message":"Need some differentiation here for the persistent-token and non-persistent token?","commit_id":"20d5e2cda7e8adeb34b48c77699fec8ed3891496"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f8231b62af49b5d036d06b61cfc34e076774f3fd","unresolved":false,"context_lines":[{"line_number":531,"context_line":"            trust_ref \u003d self.trust_api.get_trust(metadata_ref[\u0027trust_id\u0027])"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"        token_data \u003d self.v2_token_data_helper.format_token("},{"line_number":534,"context_line":"            token_ref, roles_ref, catalog_ref, trust_ref)"},{"line_number":535,"context_line":"        token_id \u003d self._get_token_id(token_data)"},{"line_number":536,"context_line":"        token_data[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] \u003d token_id"},{"line_number":537,"context_line":"        return token_id, token_data"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_4d23a758","line":534,"in_reply_to":"fa1b9901_7d67ac25","updated":"2015-08-25 21:05:33.000000000","message":"How so? The format_token method is just building the token data that is returned to the user, much like get_token_data, which is the equivalent for the v3_token_data_helper.","commit_id":"20d5e2cda7e8adeb34b48c77699fec8ed3891496"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5730a20dcc275e5d36bf5a67aa76eb75bed6e5a7","unresolved":false,"context_lines":[{"line_number":530,"context_line":"        if token_ref.get(\u0027bind\u0027) and not self._supports_bind_authentication:"},{"line_number":531,"context_line":"            msg \u003d _(\u0027The configured token provider does not support bind \u0027"},{"line_number":532,"context_line":"                    \u0027authentication.\u0027)"},{"line_number":533,"context_line":"            raise exception.NotImplemented(message\u003dmsg)"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":"        metadata_ref \u003d token_ref[\u0027metadata\u0027]"},{"line_number":536,"context_line":"        trust_ref \u003d None"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a1a9d01_3976423f","line":533,"updated":"2015-09-24 17:04:20.000000000","message":"considering that bind is entirely an undocumented API on v2, I wouldn\u0027t mind if we always raised 501, regardless of what the driver says!","commit_id":"3240fa30eb932d51f51f6022fff10d2d0549f9d5"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"2add7a8ee15e26c506d68230dc599b018a89e380","unresolved":false,"context_lines":[{"line_number":530,"context_line":"        if token_ref.get(\u0027bind\u0027) and not self._supports_bind_authentication:"},{"line_number":531,"context_line":"            msg \u003d _(\u0027The configured token provider does not support bind \u0027"},{"line_number":532,"context_line":"                    \u0027authentication.\u0027)"},{"line_number":533,"context_line":"            raise exception.NotImplemented(message\u003dmsg)"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":"        metadata_ref \u003d token_ref[\u0027metadata\u0027]"},{"line_number":536,"context_line":"        trust_ref \u003d None"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a1a9d01_05d0b152","line":533,"in_reply_to":"9a1a9d01_3976423f","updated":"2015-09-24 18:41:22.000000000","message":"+1 What this \u0027bind\u0027 is?","commit_id":"3240fa30eb932d51f51f6022fff10d2d0549f9d5"}],"keystone/token/providers/fernet/core.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1a029bf00593f75d851d2fb27aecbbb8d19f1549","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        return self.v2_token_data_helper.v3_to_v2_token(token_ref,"},{"line_number":167,"context_line":"                                                        v3_token_data)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _get_token_id(self, token_data):"},{"line_number":170,"context_line":"        \"\"\"Generate the token_id based upon the data in token_data."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        :param token_data: token information"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_c8d23900","side":"PARENT","line":169,"updated":"2015-07-28 16:14:10.000000000","message":"this doesn\u0027t seem to be fernet specific at all -- so i hope it\u0027s being moved in a later patch","commit_id":"d50dd530eea8bc97715c9d41db1c0082065f42ce"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1a029bf00593f75d851d2fb27aecbbb8d19f1549","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        return self.v2_token_data_helper.v3_to_v2_token(token_ref,"},{"line_number":112,"context_line":"                                                        v3_token_data)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def _extract_v2_token_data(self, token_data):"},{"line_number":115,"context_line":"        user_id \u003d token_data[\u0027access\u0027][\u0027user\u0027][\u0027id\u0027]"},{"line_number":116,"context_line":"        expires_at \u003d token_data[\u0027access\u0027][\u0027token\u0027][\u0027expires\u0027]"},{"line_number":117,"context_line":"        audit_ids \u003d token_data[\u0027access\u0027][\u0027token\u0027].get(\u0027audit_ids\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_a8d56de5","line":114,"updated":"2015-07-28 16:14:10.000000000","message":"this doesn\u0027t seem to be fernet specific at all -- so i hope it\u0027s being moved in a later patch","commit_id":"ab6548a9d06f83a1662ad9fff5abb8d251c8de74"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1ddd0b1e4440ca9b9ac7de61b639c9b52af3fb98","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        return self.v2_token_data_helper.v3_to_v2_token(token_ref,"},{"line_number":112,"context_line":"                                                        v3_token_data)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def _extract_v2_token_data(self, token_data):"},{"line_number":115,"context_line":"        user_id \u003d token_data[\u0027access\u0027][\u0027user\u0027][\u0027id\u0027]"},{"line_number":116,"context_line":"        expires_at \u003d token_data[\u0027access\u0027][\u0027token\u0027][\u0027expires\u0027]"},{"line_number":117,"context_line":"        audit_ids \u003d token_data[\u0027access\u0027][\u0027token\u0027].get(\u0027audit_ids\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_46d0d8f7","line":114,"in_reply_to":"3a50d1a3_a8d56de5","updated":"2015-07-30 21:10:08.000000000","message":"Right now I think the fernet token provider is the only provider that uses these utility methods. Once something else requires them I think we could move them up to the BaseProvider?","commit_id":"ab6548a9d06f83a1662ad9fff5abb8d251c8de74"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1a029bf00593f75d851d2fb27aecbbb8d19f1549","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        return (user_id, expires_at, audit_ids, methods, domain_id, project_id,"},{"line_number":130,"context_line":"                trust_id, federated_info)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _extract_v3_token_data(self, token_data):"},{"line_number":133,"context_line":"        \"\"\"Extract information from a v3 token reference.\"\"\""},{"line_number":134,"context_line":"        user_id \u003d token_data[\u0027token\u0027][\u0027user\u0027][\u0027id\u0027]"},{"line_number":135,"context_line":"        expires_at \u003d token_data[\u0027token\u0027][\u0027expires_at\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_e8cff553","line":132,"updated":"2015-07-28 16:14:10.000000000","message":"this doesn\u0027t seem to be fernet specific at all -- so i hope it\u0027s being moved in a later patch","commit_id":"ab6548a9d06f83a1662ad9fff5abb8d251c8de74"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1a029bf00593f75d851d2fb27aecbbb8d19f1549","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        :type token_data: dict"},{"line_number":151,"context_line":"        :raises keystone.exception.NotImplemented: when called"},{"line_number":152,"context_line":"        \"\"\""},{"line_number":153,"context_line":"        if token_data.get(\u0027access\u0027):"},{"line_number":154,"context_line":"            (user_id, expires_at, audit_ids, methods, domain_id, project_id,"},{"line_number":155,"context_line":"                trust_id, federated_info) \u003d self._extract_v2_token_data("},{"line_number":156,"context_line":"                    token_data)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_68952531","line":153,"updated":"2015-07-28 16:14:10.000000000","message":"include a comment that only v2 token response bodies include an \"access\" attribute?","commit_id":"ab6548a9d06f83a1662ad9fff5abb8d251c8de74"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1ddd0b1e4440ca9b9ac7de61b639c9b52af3fb98","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        :type token_data: dict"},{"line_number":151,"context_line":"        :raises keystone.exception.NotImplemented: when called"},{"line_number":152,"context_line":"        \"\"\""},{"line_number":153,"context_line":"        if token_data.get(\u0027access\u0027):"},{"line_number":154,"context_line":"            (user_id, expires_at, audit_ids, methods, domain_id, project_id,"},{"line_number":155,"context_line":"                trust_id, federated_info) \u003d self._extract_v2_token_data("},{"line_number":156,"context_line":"                    token_data)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_06ac108b","line":153,"in_reply_to":"3a50d1a3_68952531","updated":"2015-07-30 21:10:08.000000000","message":"Done","commit_id":"ab6548a9d06f83a1662ad9fff5abb8d251c8de74"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"eb7c8dcda9595c073aa7d0b110f3bb6f4529cf9a","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        # due to the fact that the V2TokenDataHelper.format_token() method"},{"line_number":71,"context_line":"        # doesn\u0027t build any of the token_reference from other Keystone APIs."},{"line_number":72,"context_line":"        # Instead, it builds it from what is persisted in the token reference."},{"line_number":73,"context_line":"        # Here we are going to leverage the V3TokenDataHelper.get_token_data()"},{"line_number":74,"context_line":"        # method written for V3 because it goes through and populates the token"},{"line_number":75,"context_line":"        # reference dynamically. Once we have a V3 token reference, we can"},{"line_number":76,"context_line":"        # attempt to convert it to a V2 token response."}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_beee8cb2","side":"PARENT","line":73,"updated":"2015-08-10 03:38:07.000000000","message":"so, this is not needed in the current code base? Is that meaning V2TokenDataHelper.format_token() can aslo get what we want, and thus we needn\u0027t leverage V3TokenDataHelper.get_token_data()?","commit_id":"ffc4a2c0acd12018fd8725afe3ee444d73999d4f"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"062a995ee6d9cbfef7d85d89b734da24cf32abd8","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        # due to the fact that the V2TokenDataHelper.format_token() method"},{"line_number":71,"context_line":"        # doesn\u0027t build any of the token_reference from other Keystone APIs."},{"line_number":72,"context_line":"        # Instead, it builds it from what is persisted in the token reference."},{"line_number":73,"context_line":"        # Here we are going to leverage the V3TokenDataHelper.get_token_data()"},{"line_number":74,"context_line":"        # method written for V3 because it goes through and populates the token"},{"line_number":75,"context_line":"        # reference dynamically. Once we have a V3 token reference, we can"},{"line_number":76,"context_line":"        # attempt to convert it to a V2 token response."}],"source_content_type":"text/x-python","patch_set":13,"id":"fa1b9901_dd01183b","side":"PARENT","line":73,"in_reply_to":"1a4dcd0f_144b4f88","updated":"2015-08-23 14:12:31.000000000","message":"Lance, thanks for the explanation! So, after this patch, fernet token will call \u0027V2TokenDataHelper.format_token()\u0027 instead to generate the token data which should not work with non-persistent token. Did I miss something?","commit_id":"ffc4a2c0acd12018fd8725afe3ee444d73999d4f"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"2d0b01678f259f95de44bbbdeb65fa1e8fd96ea2","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        # due to the fact that the V2TokenDataHelper.format_token() method"},{"line_number":71,"context_line":"        # doesn\u0027t build any of the token_reference from other Keystone APIs."},{"line_number":72,"context_line":"        # Instead, it builds it from what is persisted in the token reference."},{"line_number":73,"context_line":"        # Here we are going to leverage the V3TokenDataHelper.get_token_data()"},{"line_number":74,"context_line":"        # method written for V3 because it goes through and populates the token"},{"line_number":75,"context_line":"        # reference dynamically. Once we have a V3 token reference, we can"},{"line_number":76,"context_line":"        # attempt to convert it to a V2 token response."}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_144b4f88","side":"PARENT","line":73,"in_reply_to":"1a4dcd0f_beee8cb2","updated":"2015-08-12 14:23:53.000000000","message":"V2TokenDataHelper.format_token() relies on the fact that the data it\u0027s formatting the token with is a dictionary, which is pulled out of the database or some backend store. We can\u0027t do that with a v2.0 token since we don\u0027t persist anything about the token. \n\n\nhttps://github.com/openstack/keystone/blob/4d2bbe0e7c4e08c372e229f5622b9cfc2c25c3c6/keystone/token/providers/common.py#L118\n\nThe token_ref passed into that method is a dictionary that we don\u0027t have with non-persistent tokens.","commit_id":"ffc4a2c0acd12018fd8725afe3ee444d73999d4f"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"eb7c8dcda9595c073aa7d0b110f3bb6f4529cf9a","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        token_dict[\u0027user\u0027][\u0027name\u0027] \u003d user_id"},{"line_number":82,"context_line":"        return token_dict"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    # FIXME(lbragstad): Consolidate this into BaseProvider.validate_v2_token()"},{"line_number":85,"context_line":"    def validate_v2_token(self, token_ref):"},{"line_number":86,"context_line":"        \"\"\"Validate a V2 formatted token."},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_fee3b403","line":84,"updated":"2015-08-10 03:38:07.000000000","message":"will this be in another review?","commit_id":"0bef141f164ecc507b61f5302a3bc6fd3baae975"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"2d0b01678f259f95de44bbbdeb65fa1e8fd96ea2","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        token_dict[\u0027user\u0027][\u0027name\u0027] \u003d user_id"},{"line_number":82,"context_line":"        return token_dict"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    # FIXME(lbragstad): Consolidate this into BaseProvider.validate_v2_token()"},{"line_number":85,"context_line":"    def validate_v2_token(self, token_ref):"},{"line_number":86,"context_line":"        \"\"\"Validate a V2 formatted token."},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_541d57bc","line":84,"in_reply_to":"1a4dcd0f_fee3b403","updated":"2015-08-12 14:23:53.000000000","message":"yes https://review.openstack.org/#/c/197706/","commit_id":"0bef141f164ecc507b61f5302a3bc6fd3baae975"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"eb7c8dcda9595c073aa7d0b110f3bb6f4529cf9a","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        :param token_data: token information"},{"line_number":156,"context_line":"        :type token_data: dict"},{"line_number":157,"context_line":"        :raises keystone.exception.NotImplemented: when called"},{"line_number":158,"context_line":"        \"\"\""},{"line_number":159,"context_line":"        # NOTE(lbragstad): Only v2.0 token responses include an \u0027access\u0027"},{"line_number":160,"context_line":"        # attribute."}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_4b16ac56","line":157,"updated":"2015-08-10 03:38:07.000000000","message":"suggest to remove this line since this is not an interface anymore.","commit_id":"0bef141f164ecc507b61f5302a3bc6fd3baae975"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"2d0b01678f259f95de44bbbdeb65fa1e8fd96ea2","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        :param token_data: token information"},{"line_number":156,"context_line":"        :type token_data: dict"},{"line_number":157,"context_line":"        :raises keystone.exception.NotImplemented: when called"},{"line_number":158,"context_line":"        \"\"\""},{"line_number":159,"context_line":"        # NOTE(lbragstad): Only v2.0 token responses include an \u0027access\u0027"},{"line_number":160,"context_line":"        # attribute."}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_8f3bcad0","line":157,"in_reply_to":"1a4dcd0f_4b16ac56","updated":"2015-08-12 14:23:53.000000000","message":"Done","commit_id":"0bef141f164ecc507b61f5302a3bc6fd3baae975"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"bee943641b8a2fb4c2682032e9635c398d2ade34","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        return False"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def issue_v2_token(self, *args, **kwargs):"},{"line_number":42,"context_line":"        token_id, token_data \u003d super(Provider, self).issue_v2_token("},{"line_number":43,"context_line":"            *args, **kwargs)"},{"line_number":44,"context_line":"        self._build_issued_at_info(token_id, token_data)"},{"line_number":45,"context_line":"        return token_id, token_data"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_7dc00ce1","line":42,"updated":"2015-08-23 14:13:31.000000000","message":"this will call `v2_token_data_helper.format_token` to generate `token_data`, but not work with non-persistent token per your explanation in the previous patch, should we still use `v3_token_data_helper.get_token_data` for token data generation?","commit_id":"20d5e2cda7e8adeb34b48c77699fec8ed3891496"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f8231b62af49b5d036d06b61cfc34e076774f3fd","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        return False"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def issue_v2_token(self, *args, **kwargs):"},{"line_number":42,"context_line":"        token_id, token_data \u003d super(Provider, self).issue_v2_token("},{"line_number":43,"context_line":"            *args, **kwargs)"},{"line_number":44,"context_line":"        self._build_issued_at_info(token_id, token_data)"},{"line_number":45,"context_line":"        return token_id, token_data"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_cdc5775c","line":42,"in_reply_to":"fa1b9901_7dc00ce1","updated":"2015-08-25 21:05:33.000000000","message":"Morgan has a separate series up to address that. I think it starts here. \n\nhttps://review.openstack.org/#/c/196483/","commit_id":"20d5e2cda7e8adeb34b48c77699fec8ed3891496"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"92a2a5df27fcbebaf29351e767b343ff37b95b2a","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        return False"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def issue_v2_token(self, *args, **kwargs):"},{"line_number":42,"context_line":"        token_id, token_data \u003d super(Provider, self).issue_v2_token("},{"line_number":43,"context_line":"            *args, **kwargs)"},{"line_number":44,"context_line":"        self._build_issued_at_info(token_id, token_data)"},{"line_number":45,"context_line":"        return token_id, token_data"}],"source_content_type":"text/x-python","patch_set":15,"id":"da20952f_480ac221","line":42,"in_reply_to":"fa1b9901_cdc5775c","updated":"2015-09-11 03:29:02.000000000","message":"yup, morgan has did that, clear!","commit_id":"20d5e2cda7e8adeb34b48c77699fec8ed3891496"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"4a2d436a2526e290f565a4ed1ea4f4b332a28ff6","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        :param token_data: token information"},{"line_number":215,"context_line":"        :type token_data: dict"},{"line_number":216,"context_line":"        :raises keystone.exception.NotImplemented: when called"},{"line_number":217,"context_line":"        \"\"\""},{"line_number":218,"context_line":"        # NOTE(lbragstad): Only v2.0 token responses include an \u0027access\u0027"},{"line_number":219,"context_line":"        # attribute."}],"source_content_type":"text/x-python","patch_set":17,"id":"da20952f_a88cbe80","line":216,"updated":"2015-09-11 03:29:14.000000000","message":"these docstring will not be rendered since it\u0027s private method, and the exception message is not correct, but this can be in a follow up review since it\u0027s not under the scope of the topic.","commit_id":"7d5e355d6f0079b9e293ea29c7b3b0e98b6b55e4"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5730a20dcc275e5d36bf5a67aa76eb75bed6e5a7","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        # that we have to rely on when we validate the token."},{"line_number":63,"context_line":"        fernet_creation_datetime_obj \u003d self.token_formatter.creation_time("},{"line_number":64,"context_line":"            token_id)"},{"line_number":65,"context_line":"        if token_data.get(\u0027access\u0027):"},{"line_number":66,"context_line":"            token_data[\u0027access\u0027][\u0027token\u0027][\u0027issued_at\u0027] \u003d ks_utils.isotime("},{"line_number":67,"context_line":"                at\u003dfernet_creation_datetime_obj, subsecond\u003dTrue)"},{"line_number":68,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a1a9d01_f9dc4a1a","line":65,"updated":"2015-09-24 17:04:20.000000000","message":"if \u0027access\u0027 in token_data: would test what you\u0027re really looking for here (\"is this v2?\"), rather than testing the return value of .get(), which could be falsey in scenarios you should never expect","commit_id":"3240fa30eb932d51f51f6022fff10d2d0549f9d5"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"d1f5079be6de099b73e8b5625c7c7add0bd87090","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        token_data[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] \u003d token_ref"},{"line_number":181,"context_line":"        return token_data"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _extract_v2_token_data(self, token_data):"},{"line_number":184,"context_line":"        user_id \u003d token_data[\u0027access\u0027][\u0027user\u0027][\u0027id\u0027]"},{"line_number":185,"context_line":"        expires_at \u003d token_data[\u0027access\u0027][\u0027token\u0027][\u0027expires\u0027]"},{"line_number":186,"context_line":"        audit_ids \u003d token_data[\u0027access\u0027][\u0027token\u0027].get(\u0027audit_ids\u0027)"}],"source_content_type":"text/x-python","patch_set":28,"id":"5a5ae5dd_7760d3a5","line":183,"range":{"start_line":183,"start_character":4,"end_line":183,"end_character":49},"updated":"2016-02-05 08:05:28.000000000","message":"include a docstring:\n\n  \"\"\"Extract information from a v2.0 token reference.\"\"\"","commit_id":"2402725598e5ecc903951b7e57e3dc1c83cd8720"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"f4cc9cdf2fb70f22cbffca166ac7ea0cc81fa5f4","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    def _extract_v2_token_data(self, token_data):"},{"line_number":184,"context_line":"        user_id \u003d token_data[\u0027access\u0027][\u0027user\u0027][\u0027id\u0027]"},{"line_number":185,"context_line":"        expires_at \u003d token_data[\u0027access\u0027][\u0027token\u0027][\u0027expires\u0027]"},{"line_number":186,"context_line":"        audit_ids \u003d token_data[\u0027access\u0027][\u0027token\u0027].get(\u0027audit_ids\u0027)"},{"line_number":187,"context_line":"        methods \u003d [\u0027password\u0027]"},{"line_number":188,"context_line":"        if audit_ids:"},{"line_number":189,"context_line":"            parent_audit_id \u003d token_data[\u0027access\u0027][\u0027token\u0027].get("}],"source_content_type":"text/x-python","patch_set":28,"id":"5a5ae5dd_f42841e4","line":186,"range":{"start_line":186,"start_character":20,"end_line":186,"end_character":66},"updated":"2016-02-05 08:54:26.000000000","message":"Based on the code here, `audit_ids` should be always presented.\nhttps://review.openstack.org/#/c/197647/28/keystone/token/providers/common.py@117\n\nJust do it as what you did for V3.\n\n audit_ids \u003d token_data[\u0027access\u0027][\u0027token\u0027][\u0027audit_ids\u0027]\n\nAnd get rid of the `if` condition below.","commit_id":"2402725598e5ecc903951b7e57e3dc1c83cd8720"}]}
