Skip to content
Snippets Groups Projects

ENH: convenience function for getting the username from a connection object

Merged Henrik tom Wörden requested to merge f-get-username into dev
1 file
+ 9
0
Compare changes
  • Side-by-side
  • Inline
@@ -608,3 +608,12 @@ class _Connection(object): # pylint: disable=useless-object-inheritance
_handle_response_status(http_response)
return http_response
def get_username(self):
"""
Return the username of the current connection.
Shortcut for: get_connection()._authenticator._credentials_provider.username
"""
return self._authenticator._credentials_provider.username
Loading