All Products
Search
Document Center

SuperApp Business Application Platform:IUserAuthCallback

Last Updated:Aug 29, 2024

The callback interface class for requesting authorization from users.

public interface IUserAuthCallback

onSuccess

public void onSuccess(String authCode, List<String> authSuccessScopes, Map<String, String> authErrorScopes)

The callback function that is invoked when requested permissions are granted.

Parameters

authCode

String: the authorization code.

authSuccessScopes

List<String>: the scopes of permissions that are granted.

authErrorScopes

Map<String, String>: the scopes of permissions that fail to be granted. In a key-value pair, the key is the scope of authorization and the value is the error code.

onFailed

public void onFailed(Map<String, String> authErrorScopes)

The callback function that is invoked when requested permissions fail to be granted.

Parameters

authErrorScopes

Map<String, String>: the scopes of permissions that fail to be granted. In a key-value pair, the key is the scope of authorization and the value is the error code.