)]}'
{"keystoneclient/auth/base.py":[{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"15b7cc7c06a25aa34ece10f66892b7714fb05ebb","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import abc"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import six"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOiI%3D","line":16,"updated":"2014-01-16 07:02:33.000000000","message":"remove empty line?","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"fafa800e530e0d011cb6747beaa804959b937540","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import abc"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import six"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FI2E%3D","line":16,"in_reply_to":"AAAAUH%2F%2FOiI%3D","updated":"2014-01-17 04:26:02.000000000","message":"Done","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"15b7cc7c06a25aa34ece10f66892b7714fb05ebb","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    \"\"\"The basic structure of an authentication plugin.\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    @abc.abstractmethod"},{"line_number":25,"context_line":"    def get_token(self):"},{"line_number":26,"context_line":"        \"\"\"Return a token."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"        It is the auth plugin\u0027s responsibility to cache the token if required."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOiA%3D","line":25,"updated":"2014-01-16 07:02:33.000000000","message":"why do we need this method? If auth plugin is caching the token, it should just return it when do_authenticate() is invoked. It should be at the discretion of do_authenticate().","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"50ce274b4a8f593f218cde99287ef82c64be7c34","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    \"\"\"The basic structure of an authentication plugin.\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    @abc.abstractmethod"},{"line_number":25,"context_line":"    def get_token(self):"},{"line_number":26,"context_line":"        \"\"\"Return a token."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"        It is the auth plugin\u0027s responsibility to cache the token if required."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOZk%3D","line":25,"in_reply_to":"AAAAUH%2F%2FOiA%3D","updated":"2014-01-16 07:32:44.000000000","message":"no, these are two seperate steps. \n\nget_token returns the token if it has one - it does not have the ability to do a fetch from the server as evident by the fact there is no session passed to the method. If there is not one available it raises an exception","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"15b7cc7c06a25aa34ece10f66892b7714fb05ebb","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        are no required or standard kwargs and are here to provide any extra"},{"line_number":40,"context_line":"        information to the call."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        :param session: A session object so the plugin can make HTTP calls."},{"line_number":43,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOdw%3D","line":42,"updated":"2014-01-16 07:02:33.000000000","message":":returns: a token","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"50ce274b4a8f593f218cde99287ef82c64be7c34","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        are no required or standard kwargs and are here to provide any extra"},{"line_number":40,"context_line":"        information to the call."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        :param session: A session object so the plugin can make HTTP calls."},{"line_number":43,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOZg%3D","line":42,"in_reply_to":"AAAAUH%2F%2FOdw%3D","updated":"2014-01-16 07:32:44.000000000","message":"As above do_authenticate makes the auth calls and then saves the auth information - you can get that token with get_token","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"e7e2fe33ed002d1ca45df6da9c8ae823d6a90b66","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    @abc.abstractmethod"},{"line_number":24,"context_line":"    def get_token(self):"},{"line_number":25,"context_line":"        \"\"\"Return a token."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"        It is the auth plugin\u0027s responsibility to cache the token if required."},{"line_number":28,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2Bl6E%3D","line":25,"updated":"2014-01-24 02:26:41.000000000","message":"Return a token or None if plugin does not cache token. The effect of returning None will force session to do authenticate every time.","commit_id":"5b256c762935e25e69bb3b0d0f89e207a5071557"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"656ba94d5ef5b950effa5019d25eaa35a587332a","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    \"\"\"The basic structure of an authentication plugin.\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    @abc.abstractmethod"},{"line_number":24,"context_line":"    def get_token(self, session):"},{"line_number":25,"context_line":"        \"\"\"Obtain a token."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"        How the token is obtained is up to the plugin. If it is still valid"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2BQQs%3D","line":24,"updated":"2014-01-28 17:03:14.000000000","message":"shouldn\u0027t this be\n\ndef get_token(self, session, **kwargs):\n\nFor token rescoping, I would expect the old token to be passed in.","commit_id":"0c22f4998d96ae5fdacb74d4fc27a0573aa09339"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"f1ccf416711c9db798a60cc3aa2520d0d01c5c1b","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    \"\"\"The basic structure of an authentication plugin.\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    @abc.abstractmethod"},{"line_number":24,"context_line":"    def get_token(self, session):"},{"line_number":25,"context_line":"        \"\"\"Obtain a token."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"        How the token is obtained is up to the plugin. If it is still valid"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F99EA%3D","line":24,"in_reply_to":"AAAAUH%2F%2BPvM%3D","updated":"2014-01-31 18:06:49.000000000","message":"Well, you are assuming that user credential is static. However, in the case of multi factor authentication, user credentials are likely to be dynamic. For example, if you are using a key fob, token code changes every 60 seconds. For challenge-response type of authentication (i.e. knowledge-based), you are likely need to interact with the user to get the proper response.\n\nIf we only care about password and token auth, then there\u0027s really no point of doing auth plugin at all. But we intend to support any kind of auth plugin, we need to be more flexible.","commit_id":"0c22f4998d96ae5fdacb74d4fc27a0573aa09339"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"a43ccd74dcc55c6bc28ba8aa735bb9fa51233fe0","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    \"\"\"The basic structure of an authentication plugin.\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    @abc.abstractmethod"},{"line_number":24,"context_line":"    def get_token(self, session):"},{"line_number":25,"context_line":"        \"\"\"Obtain a token."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"        How the token is obtained is up to the plugin. If it is still valid"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2BPvM%3D","line":24,"in_reply_to":"AAAAUH%2F%2BQQs%3D","updated":"2014-01-28 18:26:36.000000000","message":"Well the way it\u0027s used there isn\u0027t really any way to pass kwargs through.\n\nWe could put kwargs on to the session.get_token() call but get_token is run by every request and i\u0027m really not sure what it is possible to pass through. \n\nIn a way the previous kwargs were kind of a placeholder to allow new variables to be passed through without upsetting the interface. \n\nIn short i can add them back but i\u0027m not sure what they would be doing any more.","commit_id":"0c22f4998d96ae5fdacb74d4fc27a0573aa09339"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"450918e3efd910c94906df81e50621682fb1b66e","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    \"\"\"The basic structure of an authentication plugin.\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    @abc.abstractmethod"},{"line_number":24,"context_line":"    def get_token(self, session):"},{"line_number":25,"context_line":"        \"\"\"Obtain a token."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"        How the token is obtained is up to the plugin. If it is still valid"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F936c%3D","line":24,"in_reply_to":"AAAAUH%2F99EA%3D","updated":"2014-02-02 21:30:22.000000000","message":"hmm, ok - i\u0027m not sure, but i dont mind having kwargs here to fix that case if we need it.","commit_id":"0c22f4998d96ae5fdacb74d4fc27a0573aa09339"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"656ba94d5ef5b950effa5019d25eaa35a587332a","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        Returning None will indicate that no token was able to be retrieved."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        :param session: A session object so the plugin can make HTTP calls."},{"line_number":34,"context_line":"        :return string: A token to use."},{"line_number":35,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2BQOc%3D","line":34,"updated":"2014-01-28 17:03:14.000000000","message":"Return token or AccessInfo object? I would expect AccessInfo.","commit_id":"0c22f4998d96ae5fdacb74d4fc27a0573aa09339"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"f1ccf416711c9db798a60cc3aa2520d0d01c5c1b","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        Returning None will indicate that no token was able to be retrieved."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        :param session: A session object so the plugin can make HTTP calls."},{"line_number":34,"context_line":"        :return string: A token to use."},{"line_number":35,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F99DY%3D","line":34,"in_reply_to":"AAAAUH%2F%2BPuk%3D","updated":"2014-01-31 18:06:49.000000000","message":"We really need to abstract the token in order to support non-bearer tokens. Services care more about user ID/name, project ID/name, role names, etc. Token is just an identifier. If we abstract it, plugins decide what type of token it needs, not the services.","commit_id":"0c22f4998d96ae5fdacb74d4fc27a0573aa09339"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"a43ccd74dcc55c6bc28ba8aa735bb9fa51233fe0","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        Returning None will indicate that no token was able to be retrieved."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        :param session: A session object so the plugin can make HTTP calls."},{"line_number":34,"context_line":"        :return string: A token to use."},{"line_number":35,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2BPuk%3D","line":34,"in_reply_to":"AAAAUH%2F%2BQOc%3D","updated":"2014-01-28 18:26:36.000000000","message":"You cant really return it from here, and i don\u0027t think it should be the session\u0027s job to deal with AccessInfos.\n\nAccessInfo only works for situations where we are dealing with a Keystone service. I don\u0027t expect/require someone implementing there own auth plugin to subclass AccessInfo.\n\nIn the event that you do have an AccessInfo object the you should subclass for auth/identity/base which has some handlers for dealing with AccessInfo. It is designed for keystone auth but will work with anything that gives back an AccessInfo.","commit_id":"0c22f4998d96ae5fdacb74d4fc27a0573aa09339"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"450918e3efd910c94906df81e50621682fb1b66e","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        Returning None will indicate that no token was able to be retrieved."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        :param session: A session object so the plugin can make HTTP calls."},{"line_number":34,"context_line":"        :return string: A token to use."},{"line_number":35,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F9354%3D","line":34,"in_reply_to":"AAAAUH%2F99DY%3D","updated":"2014-02-02 21:30:22.000000000","message":"So i don\u0027t think that we need to remove every interaction from the auth plugin. \n\nBecause you are creating an auth plugin and then  passing it to the session your application will know what auth plugin is in use. If you need information from the token you will still need to actually interact with the plugin to get that information because that\u0027s where it lives. I don\u0027t think we need to make the session know all this.\n\nFrom the point of view of the session all it needs to know is that it should put this blob in a header to authenticate itself and so i think that\u0027s all this interface should give.","commit_id":"0c22f4998d96ae5fdacb74d4fc27a0573aa09339"}],"keystoneclient/auth/identity/base.py":[{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"15b7cc7c06a25aa34ece10f66892b7714fb05ebb","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from keystoneclient.auth import base"},{"line_number":16,"context_line":"from keystoneclient import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class BaseIdentityPlugin(base.BaseAuthPlugin):"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    def __init__(self, auth_url\u003dNone, username\u003dNone,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOh4%3D","line":18,"updated":"2014-01-16 07:02:33.000000000","message":"BaseIdentityPlugin is also abstract?","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"fafa800e530e0d011cb6747beaa804959b937540","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from keystoneclient.auth import base"},{"line_number":16,"context_line":"from keystoneclient import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class BaseIdentityPlugin(base.BaseAuthPlugin):"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    def __init__(self, auth_url\u003dNone, username\u003dNone,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FI18%3D","line":18,"in_reply_to":"AAAAUH%2F%2FOZU%3D","updated":"2014-01-17 04:26:02.000000000","message":"Done","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"50ce274b4a8f593f218cde99287ef82c64be7c34","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from keystoneclient.auth import base"},{"line_number":16,"context_line":"from keystoneclient import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class BaseIdentityPlugin(base.BaseAuthPlugin):"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    def __init__(self, auth_url\u003dNone, username\u003dNone,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOZU%3D","line":18,"in_reply_to":"AAAAUH%2F%2FOh4%3D","updated":"2014-01-16 07:32:44.000000000","message":"yes, that would make sense, but it doesn\u0027t provide any abstract methods so i\u0027m not sure if it makes sense to mark it.","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"64cef8e6c0ae5b9438cb1d7bcde76f66ea7ff66c","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        self.auth_ref \u003d None"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def get_token(self):"},{"line_number":46,"context_line":"        if not self.auth_ref:"},{"line_number":47,"context_line":"            raise exceptions.AuthPluginUnauthenticated()"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2B2ZQ%3D","line":45,"updated":"2014-01-21 13:10:21.000000000","message":"I\u0027m not sure that such implementation is the best option.\nThis method cannot be called until authnticate is called.\nCause of this we\u0027ll have to write code as the one used in HTTPClient:\n\ntry:\n\n    return self.get_token()\n\nexcept exceptions.AuthPluginUnauthenticated:\n\n    self.authenticate()\n\n    return self.get_token() \n\nMaybe we should implement this method in such a way that it\u0027s calls will be deterministic and won\u0027t depend on other methods calls?","commit_id":"5b256c762935e25e69bb3b0d0f89e207a5071557"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"e6ba83ba133d9d6dcf27e682595f048e7561ccf0","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        self.auth_ref \u003d None"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def get_token(self):"},{"line_number":46,"context_line":"        if not self.auth_ref:"},{"line_number":47,"context_line":"            raise exceptions.AuthPluginUnauthenticated()"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BzhE%3D","line":45,"in_reply_to":"AAAAUH%2F%2B0n8%3D","updated":"2014-01-21 22:33:43.000000000","message":"I\u0027m not really trying for any sort of backwards compatability here regarding how the plugins work. \n\nMore what i mean is that there is nothing else in openstack that is expecting to use these plugins. \n\nI am not trying to make them plug directly into nova\u0027s client plugins.\n\nI think you are misunderstanding the levels that i am setting up here.\n\nSession is the transport layer and an instance of it is shared amongst all the clients. \nAuth Plugins connect to the session so that requests passing through the session object can contain a token. \nClients use the session to send requests to the various services.\n\nSo clients never actually interact with an auth_plugin, so what i mean above is that yes you follow the get_token then authenticate pattern but the only object in Openstack that should need to do it is the session. \n\n\nThe reason i split them like this is to allow the session control of whether to reauthenticate a plugin. You should be able to say don\u0027t automatically reauthenticate if a token has expired and i dont think that this should be handled individually by each plugin.","commit_id":"5b256c762935e25e69bb3b0d0f89e207a5071557"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"ace89d98e281654ce3124340a02a1ddc36b50aa3","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        self.auth_ref \u003d None"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def get_token(self):"},{"line_number":46,"context_line":"        if not self.auth_ref:"},{"line_number":47,"context_line":"            raise exceptions.AuthPluginUnauthenticated()"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2B0n8%3D","line":45,"in_reply_to":"AAAAUH%2F%2B0rA%3D","updated":"2014-01-21 18:43:32.000000000","message":"Unfortunately I see a contradiction in what you are saying.\n\nAs you said: \"Python is a flexible language and we should provide a developer a means to do stuff not enforce the way how it\u0027s done\".\n\nHere you do enforce the only way to use your plugin cause \"session manages all interaction with the auth plugins\". \n\nSince we are building a library and we cannot know how exactly it will be used we should try to build it basing on human logic and not backwards compatibility. Code here is enforcing the flow that is not logical and I\u0027m sure that we can achieve compatibility in a better way","commit_id":"5b256c762935e25e69bb3b0d0f89e207a5071557"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"a5dc497948e3c8bcf7a3246490216775ca36d1d6","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        self.auth_ref \u003d None"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def get_token(self):"},{"line_number":46,"context_line":"        if not self.auth_ref:"},{"line_number":47,"context_line":"            raise exceptions.AuthPluginUnauthenticated()"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2B0rA%3D","line":45,"in_reply_to":"AAAAUH%2F%2B2ZQ%3D","updated":"2014-01-21 18:27:19.000000000","message":"No, because of this we have to write code like that in the session, and that\u0027s fine because we can manage it once.\n\nThe session manages all interaction with the auth plugins. The clients then communicate with the session. \n\nThe one place where you see that style code is in httpclient.py because it is trying to do a backwards compatibility hack and simultabeously be a client and a plugin. Everyone else will just use the normal request() interface and interacting with the auth plugin is handled for them automatically.","commit_id":"5b256c762935e25e69bb3b0d0f89e207a5071557"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"bc255d2c2171fa9d3e684c08249a491df819dcca","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        self.auth_ref \u003d None"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def get_token(self):"},{"line_number":46,"context_line":"        if not self.auth_ref:"},{"line_number":47,"context_line":"            raise exceptions.AuthPluginUnauthenticated()"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BTyM%3D","line":45,"in_reply_to":"AAAAUH%2F%2Bk%2Bw%3D","updated":"2014-01-28 05:22:56.000000000","message":"We could. I\u0027m currently in favour of whatever is going to get through cause i\u0027ve been flogging this one for a while. \n\nMy thought with splitting is to allow session to control variables like reauth or the force_new_token that currently exists in client. I don\u0027t see why we would want this to be re-created by each plugin (and i don\u0027t think i would have variables on session to pass to do_authenticate if i wasn\u0027t sure they were being interprettyed). I was thinking that there is some control to be gained by setting reauth \u003d None on the session and so not automatically getting a new token. It was also really trivial to auth a new token by just returning None from get_token()\n\nHonestly if i get rid of the distinction it makes the hack back into HTTPClient a lot easier but i was trying to go for what i considered cleaner.\n\nI\u0027d be interested to here if Dean has an opinion on this one either way - or someone with some more experience in the existing nova auth plugins. Does anyone care?","commit_id":"5b256c762935e25e69bb3b0d0f89e207a5071557"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"7edf659c3b0e20360e66e3c4ea4cf9f88358c9d8","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        self.auth_ref \u003d None"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def get_token(self):"},{"line_number":46,"context_line":"        if not self.auth_ref:"},{"line_number":47,"context_line":"            raise exceptions.AuthPluginUnauthenticated()"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2Bk%2Bw%3D","line":45,"in_reply_to":"AAAAUH%2F%2Bl9Y%3D","updated":"2014-01-24 07:51:04.000000000","message":"\u003eIf plugin wants to force new authentication every time\n\nThis means that authenticate call should simply return new token each time.\nWith such approach we could simply remove usage of get_token method and store token inside of the plugin.","commit_id":"5b256c762935e25e69bb3b0d0f89e207a5071557"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"e7e2fe33ed002d1ca45df6da9c8ae823d6a90b66","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        self.auth_ref \u003d None"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def get_token(self):"},{"line_number":46,"context_line":"        if not self.auth_ref:"},{"line_number":47,"context_line":"            raise exceptions.AuthPluginUnauthenticated()"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2Bl9Y%3D","line":45,"in_reply_to":"AAAAUH%2F%2BypY%3D","updated":"2014-01-24 02:26:41.000000000","message":"Hi Alexei, I had a similar concern early on. But I kind of understand Jamie\u0027s thinking behind this. Essentially, the session controls when do_authenticate() gets invoke. When it does, the expectation is that it will always force a new authentication. If plugin wants to force new authentication every time, it will just return None for get_token(). Would that work?","commit_id":"5b256c762935e25e69bb3b0d0f89e207a5071557"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"03f6180a50d79a451d3866eb260b75eb60873cd0","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        self.auth_ref \u003d None"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def get_token(self):"},{"line_number":46,"context_line":"        if not self.auth_ref:"},{"line_number":47,"context_line":"            raise exceptions.AuthPluginUnauthenticated()"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BypY%3D","line":45,"in_reply_to":"AAAAUH%2F%2BzhE%3D","updated":"2014-01-22 04:43:18.000000000","message":"Yes but I think users can interact with this plugin in certain situation:\nlet\u0027s say user creates his own auth plugin for some sort of custom openstack client. Or let\u0027s say user replaces default session object with his custom one for some reason.\n\nWhy do we need 2 separate methods anyway (get_token, authenticate)?\nWhat is the logical reasoning for splitting them?\n\nAs you wrote in auth/base \"It is the auth plugin\u0027s responsibility to cache the token if required.\". Maybe we can only have 1 method - get_token. In this method we can do an authenticate call if not self.auth_ref and return cached token otherwise. What do you think?","commit_id":"5b256c762935e25e69bb3b0d0f89e207a5071557"}],"keystoneclient/auth/identity/v2.py":[{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"15b7cc7c06a25aa34ece10f66892b7714fb05ebb","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        token \u003d kwargs.get(\u0027token\u0027, self.token)"},{"line_number":41,"context_line":"        tenant_id \u003d kwargs.get(\u0027tenant_id\u0027, self.tenant_id)"},{"line_number":42,"context_line":"        tenant_name \u003d kwargs.get(\u0027tenant_name\u0027, self.tenant_name)"},{"line_number":43,"context_line":"        trust_id \u003d kwargs.get(\u0027trust_id\u0027, self.trust_id)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        if not auth_url:"},{"line_number":46,"context_line":"            raise exceptions.AuthorizationFailure(\"Cannot authenticate without\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOf4%3D","line":43,"updated":"2014-01-16 07:02:33.000000000","message":"I would think these are either all or nothing right? Meaning one shouldn\u0027t be specifying username from __init__() and password from kwargs. Otherwise, error handling would be confusing. If caller only have \u0027password\u0027 but no \u0027username\u0027 in kwargs, how can we tell it is intentional or not?","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"fafa800e530e0d011cb6747beaa804959b937540","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        token \u003d kwargs.get(\u0027token\u0027, self.token)"},{"line_number":41,"context_line":"        tenant_id \u003d kwargs.get(\u0027tenant_id\u0027, self.tenant_id)"},{"line_number":42,"context_line":"        tenant_name \u003d kwargs.get(\u0027tenant_name\u0027, self.tenant_name)"},{"line_number":43,"context_line":"        trust_id \u003d kwargs.get(\u0027trust_id\u0027, self.trust_id)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        if not auth_url:"},{"line_number":46,"context_line":"            raise exceptions.AuthorizationFailure(\"Cannot authenticate without\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FI0I%3D","line":43,"in_reply_to":"AAAAUH%2F%2FOYs%3D","updated":"2014-01-17 04:26:02.000000000","message":"Done","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"50ce274b4a8f593f218cde99287ef82c64be7c34","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        token \u003d kwargs.get(\u0027token\u0027, self.token)"},{"line_number":41,"context_line":"        tenant_id \u003d kwargs.get(\u0027tenant_id\u0027, self.tenant_id)"},{"line_number":42,"context_line":"        tenant_name \u003d kwargs.get(\u0027tenant_name\u0027, self.tenant_name)"},{"line_number":43,"context_line":"        trust_id \u003d kwargs.get(\u0027trust_id\u0027, self.trust_id)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        if not auth_url:"},{"line_number":46,"context_line":"            raise exceptions.AuthorizationFailure(\"Cannot authenticate without\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOYs%3D","line":43,"in_reply_to":"AAAAUH%2F%2FOf4%3D","updated":"2014-01-16 07:32:44.000000000","message":"I\u0027m not sure.\n\nI was kind of supporting this because it is similar to how client works now in that you can create the client and then override specific values to do a custom authentication. However i\u0027ve gone through a number of revisions as to how i handle the link from v2.Client to v2 auth plugin so i don\u0027t really need it anymore i think.\n\nIt doesn\u0027t make sense to *only* allow these at do_authenticate time - should we only allow setting this information at __init__ time? I\u0027m happy with that it would probably simplify some things.","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"}],"keystoneclient/auth/identity/v3.py":[{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"15b7cc7c06a25aa34ece10f66892b7714fb05ebb","unresolved":false,"context_lines":[{"line_number":25,"context_line":"                 domain_id\u003dNone, domain_name\u003dNone,"},{"line_number":26,"context_line":"                 user_domain_id\u003dNone, user_domain_name\u003dNone,"},{"line_number":27,"context_line":"                 project_id\u003dNone, project_name\u003dNone,"},{"line_number":28,"context_line":"                 project_domain_id\u003dNone, project_domain_name\u003dNone):"},{"line_number":29,"context_line":"        super(Auth, self).__init__(auth_url,"},{"line_number":30,"context_line":"                                   token\u003dtoken,"},{"line_number":31,"context_line":"                                   username\u003dusername,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOfQ%3D","line":28,"updated":"2014-01-16 07:02:33.000000000","message":"may want to make it just kwargs. List may get longer in the future (i.e. service-scope).","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"50ce274b4a8f593f218cde99287ef82c64be7c34","unresolved":false,"context_lines":[{"line_number":25,"context_line":"                 domain_id\u003dNone, domain_name\u003dNone,"},{"line_number":26,"context_line":"                 user_domain_id\u003dNone, user_domain_name\u003dNone,"},{"line_number":27,"context_line":"                 project_id\u003dNone, project_name\u003dNone,"},{"line_number":28,"context_line":"                 project_domain_id\u003dNone, project_domain_name\u003dNone):"},{"line_number":29,"context_line":"        super(Auth, self).__init__(auth_url,"},{"line_number":30,"context_line":"                                   token\u003dtoken,"},{"line_number":31,"context_line":"                                   username\u003dusername,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOYQ%3D","line":28,"in_reply_to":"AAAAUH%2F%2FOfQ%3D","updated":"2014-01-16 07:32:44.000000000","message":"I had liked the idea of not supporting old arguments here. So for example we don\u0027t support the tenant arg in v3 or project in v2 any more. \n\nI have a feeling when it comes to doing CLI args (if we do that here) then we will need **kwargs. I don\u0027t know if i care about this list getting longer but we can do kwargs if you think it\u0027s better.","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"90b0c6e10e36bcf8aa764e597aff159a08106f31","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class Auth(base.BaseIdentityPlugin):"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def __init__(self, **kwargs):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"        self.user_id \u003d kwargs.pop(\u0027user_id\u0027, None)"},{"line_number":30,"context_line":"        self.domain_id \u003d kwargs.pop(\u0027domain_id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FHJw%3D","line":27,"updated":"2014-01-17 10:38:23.000000000","message":"Why do you use kwargs instead of listing needed parameters?\nAs the end user I would have to look at your code to find our what parameters are actually needed to make it work.\n\nAt least a docstring is required describing possible arguments.","commit_id":"485c2f2f4e852d1866108072d61b56819a43474f"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"d5273e5399f8aaf10a0d9a8814681d94e77fed60","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class Auth(base.BaseIdentityPlugin):"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def __init__(self, **kwargs):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"        self.user_id \u003d kwargs.pop(\u0027user_id\u0027, None)"},{"line_number":30,"context_line":"        self.domain_id \u003d kwargs.pop(\u0027domain_id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2B%2FVI%3D","line":27,"in_reply_to":"AAAAUH%2F%2FHJw%3D","updated":"2014-01-20 06:21:53.000000000","message":"So i prefer listing parameters as it makes it explicit what is required, i had this before. It was suggested i should use kwargs as the list will generally need expanding and we have some very long function definitions. \n\nComments are absolutely required.","commit_id":"485c2f2f4e852d1866108072d61b56819a43474f"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"90b0c6e10e36bcf8aa764e597aff159a08106f31","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        if ((self.domain_id or self.domain_name) and"},{"line_number":76,"context_line":"                (self.project_id or self.project_name)):"},{"line_number":77,"context_line":"            raise exceptions.AuthorizationFailure(\u0027Authentication cannot be \u0027"},{"line_number":78,"context_line":"                                                  \u0027scoped to both domain \u0027"},{"line_number":79,"context_line":"                                                  \u0027and project.\u0027)"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FHKw%3D","line":77,"updated":"2014-01-17 10:38:23.000000000","message":"I wonder why we check attributes during auth call and not when object is created.\n\nconsider the following usecase:\n\nline#1 auth \u003d Auth(args) # object is created with wrong parameters\n\n... # lots of code here\n\nline#500 auth.do_authenticate() # here exception is raised\n\nso the error is in line#1 and exception will be raised in line#500\nIt seems to me that such approach will make debugging much harder","commit_id":"485c2f2f4e852d1866108072d61b56819a43474f"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"3358276b7e00bde44bce64babd7094a1e0b234ac","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        if ((self.domain_id or self.domain_name) and"},{"line_number":76,"context_line":"                (self.project_id or self.project_name)):"},{"line_number":77,"context_line":"            raise exceptions.AuthorizationFailure(\u0027Authentication cannot be \u0027"},{"line_number":78,"context_line":"                                                  \u0027scoped to both domain \u0027"},{"line_number":79,"context_line":"                                                  \u0027and project.\u0027)"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2B%2Bjs%3D","line":77,"in_reply_to":"AAAAUH%2F%2B%2FUo%3D","updated":"2014-01-20 07:29:49.000000000","message":"I get your idea. I personally prefer more \"functional\" approach e.g. when objects are immutable when it\u0027s possible. \n\nWith such approach I would not use functions without parameters and with no return value (like s.authenticate() ). IMHO this leads to better overall design and less error prone (cause object can be either valid or invalid and it cannot be half initialized). \nHowever I understand what you are doing and it\u0027s definitely better than previous code.","commit_id":"485c2f2f4e852d1866108072d61b56819a43474f"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"d5273e5399f8aaf10a0d9a8814681d94e77fed60","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        if ((self.domain_id or self.domain_name) and"},{"line_number":76,"context_line":"                (self.project_id or self.project_name)):"},{"line_number":77,"context_line":"            raise exceptions.AuthorizationFailure(\u0027Authentication cannot be \u0027"},{"line_number":78,"context_line":"                                                  \u0027scoped to both domain \u0027"},{"line_number":79,"context_line":"                                                  \u0027and project.\u0027)"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2B%2FUo%3D","line":77,"in_reply_to":"AAAAUH%2F%2FHKw%3D","updated":"2014-01-20 06:21:53.000000000","message":"The case initially was to allow some arguments to be presented only at the time when you did the authentication. Eg, you didn\u0027t init the object with a password, you passed it through later. \n\nI\u0027m torn here, i don\u0027t mind the idea of people half creating the object and adding parameters later. Eg\n\n    a \u003d v3.Auth(username\u003d..., password\u003d..., url\u003d...)\n\n    if some_case_in_my_project: \n        a.domain_id \u003d domain_id\n    else:\n        a.project_id \u003d project_id \n\n    s \u003d Session(auth\u003da)\n    s.authenticate()\n\nThe combination of parameters doesn\u0027t actually become required until the authentication moment so if this is hard to debug it means we need a better message.","commit_id":"485c2f2f4e852d1866108072d61b56819a43474f"}],"keystoneclient/auth/token_endpoint.py":[{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"15b7cc7c06a25aa34ece10f66892b7714fb05ebb","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from keystoneclient.auth import base"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"class Auth(base.BaseAuthPlugin):"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"    def __init__(self, token\u003dNone, endpoint\u003dNone):"},{"line_number":21,"context_line":"        self.token \u003d token"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOdM%3D","line":18,"updated":"2014-01-16 07:02:33.000000000","message":"what this for?","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"50ce274b4a8f593f218cde99287ef82c64be7c34","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from keystoneclient.auth import base"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"class Auth(base.BaseAuthPlugin):"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"    def __init__(self, token\u003dNone, endpoint\u003dNone):"},{"line_number":21,"context_line":"        self.token \u003d token"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOX4%3D","line":18,"in_reply_to":"AAAAUH%2F%2FOdM%3D","updated":"2014-01-16 07:32:44.000000000","message":"Token/Endpoint authentication. We have this already in client where you always use a specified endpoint and token, but we can\u0027t know any more information about it.","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"50ce274b4a8f593f218cde99287ef82c64be7c34","unresolved":false,"context_lines":[{"line_number":22,"context_line":"        self.endpoint \u003d endpoint"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def do_authenticate(self, session, **kwargs):"},{"line_number":25,"context_line":"        pass"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def get_token(self):"},{"line_number":28,"context_line":"        return self.token"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOXI%3D","line":25,"updated":"2014-01-16 07:32:44.000000000","message":"therefore this should raise a failure because you can\u0027t reauthenticate it (because we don\u0027t know any information about the token)","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"fafa800e530e0d011cb6747beaa804959b937540","unresolved":false,"context_lines":[{"line_number":22,"context_line":"        self.endpoint \u003d endpoint"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def do_authenticate(self, session, **kwargs):"},{"line_number":25,"context_line":"        pass"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def get_token(self):"},{"line_number":28,"context_line":"        return self.token"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FI0A%3D","line":25,"in_reply_to":"AAAAUH%2F%2FOXI%3D","updated":"2014-01-17 04:26:02.000000000","message":"Done","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"}],"keystoneclient/exceptions.py":[{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"15b7cc7c06a25aa34ece10f66892b7714fb05ebb","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class AuthPluginUnauthenticated(ClientException):"},{"line_number":59,"context_line":"    \"\"\"An authentication plugin is unauthenticated or expired.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOcs%3D","line":59,"updated":"2014-01-16 07:02:33.000000000","message":"what does this mean in plain English?","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"50ce274b4a8f593f218cde99287ef82c64be7c34","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class AuthPluginUnauthenticated(ClientException):"},{"line_number":59,"context_line":"    \"\"\"An authentication plugin is unauthenticated or expired.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOWM%3D","line":59,"in_reply_to":"AAAAUH%2F%2FOcs%3D","updated":"2014-01-16 07:32:44.000000000","message":"This is raised when you try to authenticate a message but the auth plugin is holding a token that is expired or it has never been authenticated.\n\nIt is generally handled internally to say that you should call do_authenticate and then try again.\n\nThere is an option there that says whether the session should automatically be allowed to re-authenticate itself and this is the error that is thrown when it can\u0027t re-authenticate.","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"}],"keystoneclient/httpclient.py":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"094b3e205044299aee32e929c86a62c6394d8716","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                             \"key. Ignoring.\")"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"            timeout \u003d float(timeout) if timeout is not None else None"},{"line_number":240,"context_line":"            session \u003d client_session.Session(auth\u003dself,"},{"line_number":241,"context_line":"                                             verify\u003dverify,"},{"line_number":242,"context_line":"                                             cert\u003dsession_cert,"},{"line_number":243,"context_line":"                                             original_ip\u003doriginal_ip,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2ByOw%3D","line":240,"updated":"2014-01-22 06:36:56.000000000","message":"How can I set this on a session passed in via args?  The subclass __init__() calls authenticate before I can get the client object.","commit_id":"5b256c762935e25e69bb3b0d0f89e207a5071557"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"bc255d2c2171fa9d3e684c08249a491df819dcca","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                             \"key. Ignoring.\")"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"            timeout \u003d float(timeout) if timeout is not None else None"},{"line_number":240,"context_line":"            session \u003d client_session.Session(auth\u003dself,"},{"line_number":241,"context_line":"                                             verify\u003dverify,"},{"line_number":242,"context_line":"                                             cert\u003dsession_cert,"},{"line_number":243,"context_line":"                                             original_ip\u003doriginal_ip,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BTx0%3D","line":240,"in_reply_to":"AAAAUH%2F%2Bl%2BU%3D","updated":"2014-01-28 05:22:56.000000000","message":"Yes, if you are using the session i expect you to have one with an auth plugin already. This is just here to create one for backwards compat.","commit_id":"5b256c762935e25e69bb3b0d0f89e207a5071557"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"e7e2fe33ed002d1ca45df6da9c8ae823d6a90b66","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                             \"key. Ignoring.\")"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"            timeout \u003d float(timeout) if timeout is not None else None"},{"line_number":240,"context_line":"            session \u003d client_session.Session(auth\u003dself,"},{"line_number":241,"context_line":"                                             verify\u003dverify,"},{"line_number":242,"context_line":"                                             cert\u003dsession_cert,"},{"line_number":243,"context_line":"                                             original_ip\u003doriginal_ip,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2Bl%2BU%3D","line":240,"in_reply_to":"AAAAUH%2F%2ByOw%3D","updated":"2014-01-24 02:26:41.000000000","message":"According\n\nhttps://review.openstack.org/#/c/60751/8/keystoneclient/session.py\n\nyou can just set its auth attribute like this\n\nsession.auth \u003d self","commit_id":"5b256c762935e25e69bb3b0d0f89e207a5071557"},{"author":{"_account_id":8996,"name":"Florent Flament","email":"contact@florentflament.com","username":"florent"},"change_message_id":"1cb38e71c40c16304a502c708f5cda5f52567b95","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        self._auth_token \u003d None"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        if not session:"},{"line_number":225,"context_line":"            session \u003d client_session.Session.construct(kwargs)"},{"line_number":226,"context_line":"            session.auth \u003d self"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        super(HTTPClient, self).__init__(session\u003dsession)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F9%2FB8%3D","line":225,"updated":"2014-01-31 10:53:19.000000000","message":"(nit) You may add self as the `auth` keyword argument of the `Session` constructor.","commit_id":"0c22f4998d96ae5fdacb74d4fc27a0573aa09339"}],"keystoneclient/session.py":[{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"2b59a164e796f3ce44b35e1d033a140f8fe46e8d","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    REDIRECT_STATUSES \u003d (301, 302, 303, 305, 307)"},{"line_number":38,"context_line":"    DEFAULT_REDIRECT_LIMIT \u003d 30"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def __init__(self, auth\u003dNone, session\u003dNone, original_ip\u003dNone, verify\u003dTrue,"},{"line_number":41,"context_line":"                 cert\u003dNone, timeout\u003dNone, user_agent\u003dNone,"},{"line_number":42,"context_line":"                 redirect\u003dDEFAULT_REDIRECT_LIMIT):"},{"line_number":43,"context_line":"        \"\"\"Maintains client communication state and common functionality."}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F9xfA%3D","line":40,"updated":"2014-02-04 04:26:22.000000000","message":"auth should be appended to the list.","commit_id":"e5c97738fd0ed0b4858eec6c2173abdeb37bc63e"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"2b59a164e796f3ce44b35e1d033a140f8fe46e8d","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    DEFAULT_REDIRECT_LIMIT \u003d 30"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def __init__(self, auth\u003dNone, session\u003dNone, original_ip\u003dNone, verify\u003dTrue,"},{"line_number":41,"context_line":"                 cert\u003dNone, timeout\u003dNone, user_agent\u003dNone,"},{"line_number":42,"context_line":"                 redirect\u003dDEFAULT_REDIRECT_LIMIT):"},{"line_number":43,"context_line":"        \"\"\"Maintains client communication state and common functionality."},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F9xfE%3D","line":41,"updated":"2014-02-04 04:26:22.000000000","message":"missing param doc for session","commit_id":"e5c97738fd0ed0b4858eec6c2173abdeb37bc63e"}],"keystoneclient/v2_0/client.py":[{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"15b7cc7c06a25aa34ece10f66892b7714fb05ebb","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        try:"},{"line_number":163,"context_line":"            auth \u003d v2_auth.Auth()"},{"line_number":164,"context_line":"            auth.do_authenticate(session, **kwargs)"},{"line_number":165,"context_line":"            return auth.auth_ref"},{"line_number":166,"context_line":"        except (exceptions.AuthorizationFailure, exceptions.Unauthorized):"},{"line_number":167,"context_line":"            _logger.debug(\"Authorization Failed.\")"},{"line_number":168,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOa0%3D","line":165,"updated":"2014-01-16 07:02:33.000000000","message":"not sure if I follow this logic. Client contains session, and session contains the auth plugin, should we be using the session for this?","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"50ce274b4a8f593f218cde99287ef82c64be7c34","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        try:"},{"line_number":163,"context_line":"            auth \u003d v2_auth.Auth()"},{"line_number":164,"context_line":"            auth.do_authenticate(session, **kwargs)"},{"line_number":165,"context_line":"            return auth.auth_ref"},{"line_number":166,"context_line":"        except (exceptions.AuthorizationFailure, exceptions.Unauthorized):"},{"line_number":167,"context_line":"            _logger.debug(\"Authorization Failed.\")"},{"line_number":168,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FOVM%3D","line":165,"in_reply_to":"AAAAUH%2F%2FOa0%3D","updated":"2014-01-16 07:32:44.000000000","message":"So i think this is a factor of earlier not understanding the difference between get_token and do_authenticate.\n\nWhat we\u0027ve done is a hack so that the original client will be installed as the auth plugin for a session in the original case. So this is still called as part of the original client authenticate call.\n\nSo that we don\u0027t have to replicate the actual call logic instead we just create one of the new plugins, do the authentication and then return it and discard this plugin. Creating the plugin here is purely a hack to re-use the authentication logic.","commit_id":"d605a1a04e597924f2d84adbf448baa50ca6c197"}],"keystoneclient/v3/client.py":[{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"90b0c6e10e36bcf8aa764e597aff159a08106f31","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            self.domain_name \u003d None"},{"line_number":127,"context_line":"            self.domain_id \u003d None"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def get_raw_token_from_identity_service(self, session, **kwargs):"},{"line_number":130,"context_line":"        \"\"\"Authenticate against the v3 Identity API."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :returns: access.AccessInfo if authentication was successful."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FHIc%3D","line":129,"updated":"2014-01-17 10:38:23.000000000","message":"The same question for the kwargs. End user will have no idea about what arguments must be provided to make it work unless he will read the whole library code.\n\nI would like to see a complete docstring here.","commit_id":"485c2f2f4e852d1866108072d61b56819a43474f"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"d5273e5399f8aaf10a0d9a8814681d94e77fed60","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            self.domain_name \u003d None"},{"line_number":127,"context_line":"            self.domain_id \u003d None"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def get_raw_token_from_identity_service(self, session, **kwargs):"},{"line_number":130,"context_line":"        \"\"\"Authenticate against the v3 Identity API."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :returns: access.AccessInfo if authentication was successful."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2B%2FUg%3D","line":129,"in_reply_to":"AAAAUH%2F%2FHIc%3D","updated":"2014-01-20 06:21:53.000000000","message":"So this is an existing function which really should never have been exposed to the user. I don\u0027t mind if we make this explicit with parameters.","commit_id":"485c2f2f4e852d1866108072d61b56819a43474f"}]}
