Skip to content
Snippets Groups Projects
Commit 36bbcb18 authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

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

parent 1ce56524
No related branches found
No related tags found
1 merge request!5ENH: convenience function for getting the username from a connection object
Pipeline #11958 failed
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment