Given a user key ``reference``, this method returns the user to whom the key belongs. :param ref: Reference to user key. :type ref: ``str`` :rtype: ``str``
(ref)
| 78 | |
| 79 | @staticmethod |
| 80 | def get_user(ref): |
| 81 | """ |
| 82 | Given a user key ``reference``, this method returns the user to whom the key belongs. |
| 83 | |
| 84 | :param ref: Reference to user key. |
| 85 | :type ref: ``str`` |
| 86 | |
| 87 | :rtype: ``str`` |
| 88 | """ |
| 89 | try: |
| 90 | return ref.split(USER_SEPARATOR, 1)[0] |
| 91 | except (IndexError, AttributeError): |
| 92 | raise InvalidUserKeyReferenceError(ref=ref) |
| 93 | |
| 94 | @staticmethod |
| 95 | def get_name(ref): |
no test coverage detected