)]}'
{"keystone/token/core.py":[{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"938f888abfaecc4b96b37d413aebc2bfacb57de7","unresolved":false,"context_lines":[{"line_number":29,"context_line":"config.register_int(\u0027expiration\u0027, group\u003d\u0027token\u0027, default\u003d86400)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def unique_id(token_id):"},{"line_number":33,"context_line":"    \"\"\"Return a unique ID for a token."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    The returned value is useful as the primary key of a database table,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAMX%2F%2F14Q%3D","line":32,"updated":"2012-12-13 00:34:23.000000000","message":"Would it make more sense to move these two functions into the Manager or Driver and then the modules would all have access to them without importing core?","commit_id":"8e2a183992311fe005abbfaa40d68dd7ce1fffd3"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"70afa07add6cc761834e7f1a70c8ae6827d0a6ee","unresolved":false,"context_lines":[{"line_number":29,"context_line":"config.register_int(\u0027expiration\u0027, group\u003d\u0027token\u0027, default\u003d86400)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def unique_id(token_id):"},{"line_number":33,"context_line":"    \"\"\"Return a unique ID for a token."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    The returned value is useful as the primary key of a database table,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAMX%2F%2F1w8%3D","line":32,"in_reply_to":"AAAAMX%2F%2F14Q%3D","updated":"2012-12-13 01:59:39.000000000","message":"I asked myself the same question. I don\u0027t have a great answer, but here are my thoughts...\n\nI\u0027d say no to the Driver / Manager because drivers don\u0027t need to implement or override them and no to the Controller because they\u0027re not bound to the web layer nor should they vary by API version.\n\nI stuck them here mostly just because catalog has a similar module level function (format_url)... if anything, I\u0027d say keystone.token.utils or something would be appropriate... my only hesitation with a utils module is that default_expire_time() pulls from config, and I would find that very unexpected for a utility module (I would expect such a module to be importable without requiring any supporting code / configuration).\n\nI\u0027m also not opposed to modules within a package importing their own \u0027core\u0027 module directly, other than it setting a potentially bad example for those implementing their own drivers (who shouldn\u0027t be importing core externally).","commit_id":"8e2a183992311fe005abbfaa40d68dd7ce1fffd3"}]}
