)]}'
{"keystone/token/provider.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f299d9b1a397feecd75b89005882bbd38b879b1e","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @MEMOIZE"},{"line_number":291,"context_line":"    def _validate_non_persistent_token(self, token_id):"},{"line_number":292,"context_line":"        return self.validate_non_persistent_token(token_id)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @MEMOIZE"},{"line_number":295,"context_line":"    def _validate_token(self, token_id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_13d1bdfa","line":292,"updated":"2016-06-07 21:42:43.000000000","message":"this is strange because it\u0027s got the private method, _validate_non_persistent_token, calling the public method, validate_non_persistent_token. It should be the other way around just like in the other methods. (e.g., validate_v3_token calls _validate_v3_token, not the other way around).","commit_id":"a6f6af0be9129fe0cfb888ee38f13d19b69bc272"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"02057f005897acc2304a7a130e919e10ac9a4e95","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @MEMOIZE"},{"line_number":291,"context_line":"    def _validate_non_persistent_token(self, token_id):"},{"line_number":292,"context_line":"        return self.validate_non_persistent_token(token_id)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @MEMOIZE"},{"line_number":295,"context_line":"    def _validate_token(self, token_id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_1626cb14","line":292,"in_reply_to":"7aa08908_13d1bdfa","updated":"2016-06-07 22:09:31.000000000","message":"this should be\n\n @MEMOIZE\n def validate_non_persistent_token(self, token_id):\n    return self.driver.validate_non_persistent_token(token_id)","commit_id":"a6f6af0be9129fe0cfb888ee38f13d19b69bc272"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c5c4538d9a4a52117b808afb65cb27d87348f655","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @MEMOIZE"},{"line_number":291,"context_line":"    def _validate_non_persistent_token(self, token_id):"},{"line_number":292,"context_line":"        return self.validate_non_persistent_token(token_id)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @MEMOIZE"},{"line_number":295,"context_line":"    def _validate_token(self, token_id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_3628279a","line":292,"in_reply_to":"7aa08908_1626cb14","updated":"2016-06-07 22:15:58.000000000","message":"also, need to invalidate it just like the other validate_*s.","commit_id":"a6f6af0be9129fe0cfb888ee38f13d19b69bc272"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"e3b65fd59630043109eec4dbc9f60fc22d3412ee","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @MEMOIZE"},{"line_number":291,"context_line":"    def _validate_non_persistent_token(self, token_id):"},{"line_number":292,"context_line":"        return self.validate_non_persistent_token(token_id)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @MEMOIZE"},{"line_number":295,"context_line":"    def _validate_token(self, token_id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_8980dcc1","line":292,"in_reply_to":"7aa08908_1626cb14","updated":"2016-06-07 22:37:49.000000000","message":"you\u0027re right, it should be that....(I just copied what was there before!)","commit_id":"a6f6af0be9129fe0cfb888ee38f13d19b69bc272"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"1e51a74d03e29f6a031fa9b374f14084f95f539c","unresolved":false,"context_lines":[{"line_number":239,"context_line":"            # is one where the token providers just handle data and the"},{"line_number":240,"context_line":"            # controller layers handle interpreting the token data in a format"},{"line_number":241,"context_line":"            # that makes sense for the request."},{"line_number":242,"context_line":"            v3_token_ref \u003d self.validate_non_persistent_token(token_id)"},{"line_number":243,"context_line":"            v2_token_data_helper \u003d providers.common.V2TokenDataHelper()"},{"line_number":244,"context_line":"            token \u003d v2_token_data_helper.v3_to_v2_token(v3_token_ref)"},{"line_number":245,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_56a14cf7","line":242,"range":{"start_line":242,"start_character":27,"end_line":242,"end_character":71},"updated":"2016-06-08 11:45:54.000000000","message":"This should be updated to _validate_non_persistent_token as well","commit_id":"8b7c7848dab32d13613297a4aa5c2fb9750a0905"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"9a796ea9aa0d183d9edd34af74ea412a87ccd9e7","unresolved":false,"context_lines":[{"line_number":239,"context_line":"            # is one where the token providers just handle data and the"},{"line_number":240,"context_line":"            # controller layers handle interpreting the token data in a format"},{"line_number":241,"context_line":"            # that makes sense for the request."},{"line_number":242,"context_line":"            v3_token_ref \u003d self.validate_non_persistent_token(token_id)"},{"line_number":243,"context_line":"            v2_token_data_helper \u003d providers.common.V2TokenDataHelper()"},{"line_number":244,"context_line":"            token \u003d v2_token_data_helper.v3_to_v2_token(v3_token_ref)"},{"line_number":245,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_3f9f3360","line":242,"range":{"start_line":242,"start_character":27,"end_line":242,"end_character":71},"in_reply_to":"7aa08908_56a14cf7","updated":"2016-06-08 12:28:27.000000000","message":"yes, I think that\u0027s true - Liberty would also cache in this case...","commit_id":"8b7c7848dab32d13613297a4aa5c2fb9750a0905"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"1e51a74d03e29f6a031fa9b374f14084f95f539c","unresolved":false,"context_lines":[{"line_number":288,"context_line":"            raise exception.TokenNotFound(token_id\u003dtoken_id)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @MEMOIZE"},{"line_number":291,"context_line":"    def _validate_non_persistent_token(self, token_id):"},{"line_number":292,"context_line":"        return self.driver.validate_non_persistent_token(token_id)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @MEMOIZE"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_56ef8c1d","line":291,"range":{"start_line":291,"start_character":8,"end_line":291,"end_character":38},"updated":"2016-06-08 11:45:54.000000000","message":"So this never gets invalidated ? (other than when cache expires?)","commit_id":"8b7c7848dab32d13613297a4aa5c2fb9750a0905"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"9a796ea9aa0d183d9edd34af74ea412a87ccd9e7","unresolved":false,"context_lines":[{"line_number":288,"context_line":"            raise exception.TokenNotFound(token_id\u003dtoken_id)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @MEMOIZE"},{"line_number":291,"context_line":"    def _validate_non_persistent_token(self, token_id):"},{"line_number":292,"context_line":"        return self.driver.validate_non_persistent_token(token_id)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @MEMOIZE"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_7ca429b9","line":291,"range":{"start_line":291,"start_character":8,"end_line":291,"end_character":38},"in_reply_to":"7aa08908_56ef8c1d","updated":"2016-06-08 12:28:27.000000000","message":"Correct, but the validation will fail if there is a relevant revoke event (see _is_valid_token() ).  This was true in Liberty as well.","commit_id":"8b7c7848dab32d13613297a4aa5c2fb9750a0905"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"61036b48a6c700797167dd663330b2281f88f2b5","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @MEMOIZE"},{"line_number":291,"context_line":"    def _validate_non_persistent_token(self, token_id):"},{"line_number":292,"context_line":"        return self.driver.validate_non_persistent_token(token_id)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @MEMOIZE"},{"line_number":295,"context_line":"    def _validate_token(self, token_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_e52358bb","line":292,"updated":"2016-06-08 12:56:27.000000000","message":"There\u0027s no need to have .driver on this call since the manager doesn\u0027t re-implement the validate_non_persistent_token method.","commit_id":"fbac8d6f1e6d7a69634f10c6b8bb8d57044bf3ea"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"0ed11b9f866b9d94bcf08eb289ba286368f23670","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @MEMOIZE"},{"line_number":291,"context_line":"    def _validate_non_persistent_token(self, token_id):"},{"line_number":292,"context_line":"        return self.driver.validate_non_persistent_token(token_id)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @MEMOIZE"},{"line_number":295,"context_line":"    def _validate_token(self, token_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_eb0f9834","line":292,"in_reply_to":"7aa08908_6b63a842","updated":"2016-06-08 16:41:02.000000000","message":"Sorry, right got it!!! Re-read your easier comment!! Sorry!","commit_id":"fbac8d6f1e6d7a69634f10c6b8bb8d57044bf3ea"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"af452d62a38f229960c949cda8f5b901a43074db","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @MEMOIZE"},{"line_number":291,"context_line":"    def _validate_non_persistent_token(self, token_id):"},{"line_number":292,"context_line":"        return self.driver.validate_non_persistent_token(token_id)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @MEMOIZE"},{"line_number":295,"context_line":"    def _validate_token(self, token_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_7f9b6266","line":292,"in_reply_to":"7aa08908_7fad229a","updated":"2016-06-08 17:40:44.000000000","message":"Done","commit_id":"fbac8d6f1e6d7a69634f10c6b8bb8d57044bf3ea"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"e8a20d411f3824d5719e9ec5d915a645e035579f","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @MEMOIZE"},{"line_number":291,"context_line":"    def _validate_non_persistent_token(self, token_id):"},{"line_number":292,"context_line":"        return self.driver.validate_non_persistent_token(token_id)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @MEMOIZE"},{"line_number":295,"context_line":"    def _validate_token(self, token_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_9015749d","line":292,"in_reply_to":"7aa08908_e52358bb","updated":"2016-06-08 13:06:54.000000000","message":"++","commit_id":"fbac8d6f1e6d7a69634f10c6b8bb8d57044bf3ea"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"03b025689a3d2745032255f5ef79e5cebd77e505","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @MEMOIZE"},{"line_number":291,"context_line":"    def _validate_non_persistent_token(self, token_id):"},{"line_number":292,"context_line":"        return self.driver.validate_non_persistent_token(token_id)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @MEMOIZE"},{"line_number":295,"context_line":"    def _validate_token(self, token_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_6b63a842","line":292,"in_reply_to":"7aa08908_e52358bb","updated":"2016-06-08 16:39:43.000000000","message":"I thought that\u0027s what you were asking me to do with your comment on the earlier version?","commit_id":"fbac8d6f1e6d7a69634f10c6b8bb8d57044bf3ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"2a1358072a4932cf204e33514291214f1d9c7527","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @MEMOIZE"},{"line_number":291,"context_line":"    def _validate_non_persistent_token(self, token_id):"},{"line_number":292,"context_line":"        return self.driver.validate_non_persistent_token(token_id)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @MEMOIZE"},{"line_number":295,"context_line":"    def _validate_token(self, token_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_7fad229a","line":292,"in_reply_to":"7aa08908_eb0f9834","updated":"2016-06-08 17:39:06.000000000","message":"y, in my earlier comment I said to do:\n\n def validate_non_persistent_token(...)\n\n(without the _ prefix) which would hide the driver implementation, then self.driver would be needed to actually call the driver implementation rather than get in an infinite loop.\n\nI still think that this should be validate_non_persistent_token since then the driver implementation would be hidden and users would get the memoized version \"by default\". I\u0027m fine with it either way.","commit_id":"fbac8d6f1e6d7a69634f10c6b8bb8d57044bf3ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"61036b48a6c700797167dd663330b2281f88f2b5","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        if not self._needs_persistence:"},{"line_number":300,"context_line":"            # NOTE(lbragstad): This will validate v2 and v3 non-persistent"},{"line_number":301,"context_line":"            # tokens."},{"line_number":302,"context_line":"            return self.driver.validate_non_persistent_token(token_id)"},{"line_number":303,"context_line":"        token_ref \u003d self._persistence.get_token(token_id)"},{"line_number":304,"context_line":"        version \u003d self.get_token_version(token_ref)"},{"line_number":305,"context_line":"        if version \u003d\u003d self.V3:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_c543bc6a","line":302,"updated":"2016-06-08 12:56:27.000000000","message":"there\u0027s no need to have .driver on this call either.","commit_id":"fbac8d6f1e6d7a69634f10c6b8bb8d57044bf3ea"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"e8a20d411f3824d5719e9ec5d915a645e035579f","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        if not self._needs_persistence:"},{"line_number":300,"context_line":"            # NOTE(lbragstad): This will validate v2 and v3 non-persistent"},{"line_number":301,"context_line":"            # tokens."},{"line_number":302,"context_line":"            return self.driver.validate_non_persistent_token(token_id)"},{"line_number":303,"context_line":"        token_ref \u003d self._persistence.get_token(token_id)"},{"line_number":304,"context_line":"        version \u003d self.get_token_version(token_ref)"},{"line_number":305,"context_line":"        if version \u003d\u003d self.V3:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_b037d04b","line":302,"in_reply_to":"7aa08908_c543bc6a","updated":"2016-06-08 13:06:54.000000000","message":"++ (although unrelated)","commit_id":"fbac8d6f1e6d7a69634f10c6b8bb8d57044bf3ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0e7960fab8d653af83d1d449c778cc126bc45d98","unresolved":false,"context_lines":[{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        self._validate_token.invalidate(self, token_id)"},{"line_number":432,"context_line":"        self._validate_v2_token.invalidate(self, token_id)"},{"line_number":433,"context_line":"        self._validate_v3_token.invalidate(self, token_id)"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    def revoke_token(self, token_id, revoke_chain\u003dFalse):"},{"line_number":436,"context_line":"        token_ref \u003d token_model.KeystoneToken("}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_8b29c58c","line":433,"updated":"2016-06-08 13:10:09.000000000","message":"Here\u0027s where all the other cache invalidations happen.","commit_id":"fbac8d6f1e6d7a69634f10c6b8bb8d57044bf3ea"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"03b025689a3d2745032255f5ef79e5cebd77e505","unresolved":false,"context_lines":[{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        self._validate_token.invalidate(self, token_id)"},{"line_number":432,"context_line":"        self._validate_v2_token.invalidate(self, token_id)"},{"line_number":433,"context_line":"        self._validate_v3_token.invalidate(self, token_id)"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    def revoke_token(self, token_id, revoke_chain\u003dFalse):"},{"line_number":436,"context_line":"        token_ref \u003d token_model.KeystoneToken("}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_abb3d008","line":433,"in_reply_to":"7aa08908_8b29c58c","updated":"2016-06-08 16:39:43.000000000","message":"this is only called for persistent tokens....via the persistent token manager","commit_id":"fbac8d6f1e6d7a69634f10c6b8bb8d57044bf3ea"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"e8a20d411f3824d5719e9ec5d915a645e035579f","unresolved":false,"context_lines":[{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        if CONF.token.revoke_by_id and self._needs_persistence:"},{"line_number":451,"context_line":"            self._persistence.delete_token(token_id\u003dtoken_id)"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    def list_revoked_tokens(self):"},{"line_number":454,"context_line":"        return self._persistence.list_revoked_tokens()"},{"line_number":455,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_709ba818","line":452,"updated":"2016-06-08 13:06:54.000000000","message":"you should add an invalidate to the new method here if you want to invalidate the cache at least for the case of explicit token revocation","commit_id":"fbac8d6f1e6d7a69634f10c6b8bb8d57044bf3ea"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"03b025689a3d2745032255f5ef79e5cebd77e505","unresolved":false,"context_lines":[{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        if CONF.token.revoke_by_id and self._needs_persistence:"},{"line_number":451,"context_line":"            self._persistence.delete_token(token_id\u003dtoken_id)"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    def list_revoked_tokens(self):"},{"line_number":454,"context_line":"        return self._persistence.list_revoked_tokens()"},{"line_number":455,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_2b81a08f","line":452,"in_reply_to":"7aa08908_709ba818","updated":"2016-06-08 16:39:43.000000000","message":"Well, I could.  We certainly didn\u0027t do that in Liberty, so I was trying to make this first patch just to revert to the way it ways....but if you feel strongly, I agree it would be better to have it!","commit_id":"fbac8d6f1e6d7a69634f10c6b8bb8d57044bf3ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0e7960fab8d653af83d1d449c778cc126bc45d98","unresolved":false,"context_lines":[{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        if CONF.token.revoke_by_id and self._needs_persistence:"},{"line_number":451,"context_line":"            self._persistence.delete_token(token_id\u003dtoken_id)"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    def list_revoked_tokens(self):"},{"line_number":454,"context_line":"        return self._persistence.list_revoked_tokens()"},{"line_number":455,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_ab0be122","line":452,"in_reply_to":"7aa08908_709ba818","updated":"2016-06-08 13:10:09.000000000","message":"it\u0027s up at line 433 where all the other token cache invalidations happen.","commit_id":"fbac8d6f1e6d7a69634f10c6b8bb8d57044bf3ea"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"eacd030b1d70a65051858b37eb752bd6997e62e8","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        if not self._needs_persistence:"},{"line_number":300,"context_line":"            # NOTE(lbragstad): This will validate v2 and v3 non-persistent"},{"line_number":301,"context_line":"            # tokens."},{"line_number":302,"context_line":"            return self.driver.validate_non_persistent_token(token_id)"},{"line_number":303,"context_line":"        token_ref \u003d self._persistence.get_token(token_id)"},{"line_number":304,"context_line":"        version \u003d self.get_token_version(token_ref)"},{"line_number":305,"context_line":"        if version \u003d\u003d self.V3:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_7f008266","line":302,"range":{"start_line":302,"start_character":24,"end_line":302,"end_character":31},"updated":"2016-06-08 17:42:41.000000000","message":"remove this, so it benefits from cache","commit_id":"34243a88eeb277204b6fbbf14587fd2942c2163c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"72458bec6289079ac9118394ab731e64455b32d1","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        if not self._needs_persistence:"},{"line_number":300,"context_line":"            # NOTE(lbragstad): This will validate v2 and v3 non-persistent"},{"line_number":301,"context_line":"            # tokens."},{"line_number":302,"context_line":"            return self.driver.validate_non_persistent_token(token_id)"},{"line_number":303,"context_line":"        token_ref \u003d self._persistence.get_token(token_id)"},{"line_number":304,"context_line":"        version \u003d self.get_token_version(token_ref)"},{"line_number":305,"context_line":"        if version \u003d\u003d self.V3:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_dab2644b","line":302,"range":{"start_line":302,"start_character":24,"end_line":302,"end_character":31},"in_reply_to":"7aa08908_1faa1e19","updated":"2016-06-08 17:56:20.000000000","message":"Just to flesh out the idea a little, the interface could be like\n\n @MEMOIZE\n validate_token(token_id, version)\n\nand then just call _validate_token, _validate_v3_token, _validate_v2_token based on the version passed in, then no need to put @MEMOIZE on _validate_v3_token, etc.","commit_id":"34243a88eeb277204b6fbbf14587fd2942c2163c"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"fb7f39688619e1c0cd24bd4ea66e86b5abbe742c","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        if not self._needs_persistence:"},{"line_number":300,"context_line":"            # NOTE(lbragstad): This will validate v2 and v3 non-persistent"},{"line_number":301,"context_line":"            # tokens."},{"line_number":302,"context_line":"            return self.driver.validate_non_persistent_token(token_id)"},{"line_number":303,"context_line":"        token_ref \u003d self._persistence.get_token(token_id)"},{"line_number":304,"context_line":"        version \u003d self.get_token_version(token_ref)"},{"line_number":305,"context_line":"        if version \u003d\u003d self.V3:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_bf002a35","line":302,"range":{"start_line":302,"start_character":24,"end_line":302,"end_character":31},"in_reply_to":"7aa08908_7f008266","updated":"2016-06-08 17:47:42.000000000","message":"it\u0027s already got a cache at the start of this method, no need to cache it twice","commit_id":"34243a88eeb277204b6fbbf14587fd2942c2163c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"aa34d79c09aae45266f6ab01c4ea8c981c545120","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        if not self._needs_persistence:"},{"line_number":300,"context_line":"            # NOTE(lbragstad): This will validate v2 and v3 non-persistent"},{"line_number":301,"context_line":"            # tokens."},{"line_number":302,"context_line":"            return self.driver.validate_non_persistent_token(token_id)"},{"line_number":303,"context_line":"        token_ref \u003d self._persistence.get_token(token_id)"},{"line_number":304,"context_line":"        version \u003d self.get_token_version(token_ref)"},{"line_number":305,"context_line":"        if version \u003d\u003d self.V3:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_1faa1e19","line":302,"range":{"start_line":302,"start_character":24,"end_line":302,"end_character":31},"in_reply_to":"7aa08908_bf002a35","updated":"2016-06-08 17:50:29.000000000","message":"I agree with henry. Double caching would be weird. This whole area needs refactoring so that there\u0027s a single entry point that\u0027s cached anyways.","commit_id":"34243a88eeb277204b6fbbf14587fd2942c2163c"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"a0bdeafcc0e06d78a7e429d6bd4698c23248fc57","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        if not self._needs_persistence:"},{"line_number":300,"context_line":"            # NOTE(lbragstad): This will validate v2 and v3 non-persistent"},{"line_number":301,"context_line":"            # tokens."},{"line_number":302,"context_line":"            return self.driver.validate_non_persistent_token(token_id)"},{"line_number":303,"context_line":"        token_ref \u003d self._persistence.get_token(token_id)"},{"line_number":304,"context_line":"        version \u003d self.get_token_version(token_ref)"},{"line_number":305,"context_line":"        if version \u003d\u003d self.V3:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_70ea6f75","line":302,"range":{"start_line":302,"start_character":24,"end_line":302,"end_character":31},"in_reply_to":"7aa08908_dab2644b","updated":"2016-06-08 18:43:12.000000000","message":"Agreed","commit_id":"34243a88eeb277204b6fbbf14587fd2942c2163c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"aa34d79c09aae45266f6ab01c4ea8c981c545120","unresolved":false,"context_lines":[{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        self._validate_token.invalidate(self, token_id)"},{"line_number":432,"context_line":"        self._validate_v2_token.invalidate(self, token_id)"},{"line_number":433,"context_line":"        self._validate_v3_token.invalidate(self, token_id)"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    def revoke_token(self, token_id, revoke_chain\u003dFalse):"},{"line_number":436,"context_line":"        token_ref \u003d token_model.KeystoneToken("}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_1f817e8f","line":433,"updated":"2016-06-08 17:50:29.000000000","message":"I still think the new memoized fn needs to be invalidated:\n\n self.validate_non_persistent_token.invalidate(self, token_id)","commit_id":"34243a88eeb277204b6fbbf14587fd2942c2163c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"eb83122ec434f06d0b48b62ac676b3cf7d772157","unresolved":false,"context_lines":[{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        self._validate_token.invalidate(self, token_id)"},{"line_number":432,"context_line":"        self._validate_v2_token.invalidate(self, token_id)"},{"line_number":433,"context_line":"        self._validate_v3_token.invalidate(self, token_id)"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    def revoke_token(self, token_id, revoke_chain\u003dFalse):"},{"line_number":436,"context_line":"        token_ref \u003d token_model.KeystoneToken("}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_3a056810","line":433,"in_reply_to":"7aa08908_1f817e8f","updated":"2016-06-08 17:53:07.000000000","message":"In liberty, fernet would call validate_v3_token (or validate_v2_token) which would call _validate_v3_token, which was memoized and also invalidated in this function, so I don\u0027t think that invalidating was not done in the liberty case.","commit_id":"34243a88eeb277204b6fbbf14587fd2942c2163c"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"6935ca15682a4aa22792302f07996691bd0e9961","unresolved":false,"context_lines":[{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        self._validate_token.invalidate(self, token_id)"},{"line_number":432,"context_line":"        self._validate_v2_token.invalidate(self, token_id)"},{"line_number":433,"context_line":"        self._validate_v3_token.invalidate(self, token_id)"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    def revoke_token(self, token_id, revoke_chain\u003dFalse):"},{"line_number":436,"context_line":"        token_ref \u003d token_model.KeystoneToken("}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_5a9e74b9","line":433,"in_reply_to":"7aa08908_3a056810","updated":"2016-06-08 17:56:46.000000000","message":"let me check.....but I\u0027m pretty sure that the only place invalidate_individual_token_cache() gets called is from inside the persistent driver code (which would never get called for fernet)","commit_id":"34243a88eeb277204b6fbbf14587fd2942c2163c"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"a18600a42545316908dd94ef095b25d7c094b5b8","unresolved":false,"context_lines":[{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        self._validate_token.invalidate(self, token_id)"},{"line_number":432,"context_line":"        self._validate_v2_token.invalidate(self, token_id)"},{"line_number":433,"context_line":"        self._validate_v3_token.invalidate(self, token_id)"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    def revoke_token(self, token_id, revoke_chain\u003dFalse):"},{"line_number":436,"context_line":"        token_ref \u003d token_model.KeystoneToken("}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_5a0834da","line":433,"in_reply_to":"7aa08908_5a9e74b9","updated":"2016-06-08 17:58:22.000000000","message":"...but I\u0027ve no issue adding here just in case!","commit_id":"34243a88eeb277204b6fbbf14587fd2942c2163c"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"5cdd56a4035a447b1053e9c6d1216c8923ea50bd","unresolved":false,"context_lines":[{"line_number":433,"context_line":"        self._validate_v3_token.invalidate(self, token_id)"},{"line_number":434,"context_line":"        # This method isn\u0027t actually called in the case of non-persistent"},{"line_number":435,"context_line":"        # tokens, but we include the invalidation in case this ever changes"},{"line_number":436,"context_line":"        # in the future."},{"line_number":437,"context_line":"        self.validate_non_persistent_token.invalidate(self, token_id)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def revoke_token(self, token_id, revoke_chain\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_f0f65f5b","line":436,"range":{"start_line":436,"start_character":10,"end_line":436,"end_character":24},"updated":"2016-06-08 18:44:44.000000000","message":"https://review.openstack.org/#/c/316991/","commit_id":"9c89e07b11afa2e12c97d0af514ce5fcc04e2ac3"}]}
