TKMUserManager
The user manager takes care of user authentication and provides access to the currently logged-in users.
The following code sample illustrates how to use this class to retrieve the list of logged-in users.
let userManager = tapkeyServiceFactory.userManager
let users = userManager.users
// Now, users contains a list of IDs of all logged-in users. Usually, users.count will be 1,
// however, it is possible to log in multiple users at the same time.
The exemplary code below demonstrates how to log in a user:
let userManager = tapkeyServiceFactory.userManager
userManager.logInAsync(accessToken: tapkeyAccessToken, cancellationToken: ct)
Implementors have to make sure that a token refresh handler was set via the TKMServiceFactory builder prior to logging in any users.
-
Returns IDs of the users who are currently logged in.
-
Logs in a user with a Tapkey access token.
-
Logs out a user with a Tapkey access token.
-
Replaces the access token for the specified user.