User Grants¶
A User Grant represents the user's perspective of a Grant created by the owner through the Tapkey Web API. It provides detailed information about the user's access permissions.
The Tapkey Mobile SDK for Android allows fetching a list of all Grants granted to the user. To retrieve a list of User Grants, you can obtain the UserGrantManager
through the TapkeyServiceFactory
.
The UserGrantManager
fetches the User Grants live from the Tapkey Trust Service. Therefore, the application must be online for the operation to succeed. An application may consider caching this data for potential future use, should the mobile device become offline.
UserGrantManager userGrantManager = tapkeyServiceFactory.getUserGrantManager();
userGrantManager.fetchUserGrantsAsync(userId, cancellationToken)
.continueOnUi((List<UserGrant> userGrants) -> {
// ToDo: Handle userGrants
return null;
})
.catchOnUi((AsyncException e) -> {
// ToDo: Add error handling
return null;
})
.conclude();