Skip to content
Snippets Groups Projects
Commit 729fbdcc authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

Merge branch 'f-get-username' into 'dev'

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

See merge request !5
parents 863988af 36bbcb18
No related branches found
No related tags found
1 merge request!5ENH: convenience function for getting the username from a connection object
Pipeline #6292 passed with warnings
......@@ -611,3 +611,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