Acquire.Client._user module¶
-
class
User(username=None, user_uid=None, identity_url=None, identity_uid=None)[source]¶ Bases:
objectThis class holds all functionality that would be used by a user to authenticate with and access the service. This represents a single client login, and is the user-facing part of Acquire
-
guid()[source]¶ Return the global UID of the user. While the UID is highly likely to be unique, the GUID should be globally guaranteed to be unique. This is ensured by combining the UID of the user with the UID of the identity service that primarily identifies the user
-
identity_service()[source]¶ Return the identity service info object for the identity service used to validate the identity of this user
-
identity_service_uid()[source]¶ Return the UID of the identity service. The combination of user_uid+service_uid should uniquely identify this user account anywhere in the world
-
identity_service_url()[source]¶ Return the URL to the identity service. This is the full URL to the service, minus the actual function to be called, e.g. https://function_service.com/t/identity
-
is_empty()[source]¶ Return whether or not this is an empty login (so has not been used for anything yet…
-
login_qr_code()[source]¶ Return a QR code of the login URL that the user must connect to to authenticate this login session
-
login_url()[source]¶ Return the URL that the user must connect to to authenticate this login session
-
register(password, identity_url=None)[source]¶ Request to register this user with the identity service running at ‘identity_url’, using the supplied ‘password’. This will return a QR code that you must use immediately to add this user on the identity service to a QR code generator
-
request_login(login_message=None, _is_local=False)[source]¶ Request to authenticate as this user. This returns a login URL that you must connect to to supply your login credentials
If ‘login_message’ is supplied, then this is passed to the identity service so that it can be displayed when the user accesses the login page. This helps the user validate that they have accessed the correct login page. Note that if the message is None, then a random message will be generated.
-
-
username_to_uid(username, identity_url=None)[source]¶ Function to return the uid for the passed username