diff --git a/src/caosdb/connection/connection.py b/src/caosdb/connection/connection.py index fc699ab5db1db36bc1ee63034b6828eec4d16bc1..bcad5d7c9288a79867da864e007e2f3b813fd562 100644 --- a/src/caosdb/connection/connection.py +++ b/src/caosdb/connection/connection.py @@ -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 +