/*** Gets the mini program permission list* @param appID - Mini program appid* @param appVerType - Mini program version type* @return*/public static List<MiniAuthState> getAuthStateList(String appId, int appVerType)
/*** Sets the authorization status. It is supported in the mini program process.** @param appID - Mini program appid* @param appVerType - Mini program version type* @param scopeName - Permission name* @param grant - Whether to authorize*/public static void setAuthState(String appId, int appVerType, String scopeName, boolean grant)
public interface IScopeInfoProxy {/*** Returns the permission list information that needs to be customized* @return*/List<PermissionInfo> getScopeInfos();}
@ProxyService(proxy = IScopeInfoProxy.class)public class ScopeInfoProxyImpl implements IScopeInfoProxy {@Overridepublic List<PermissionInfo> getScopeInfos() {// You can modify Scope information, such as name and descriptionArrayList<PermissionInfo> perms = new ArrayList<>();PermissionInfo userInfo = new PermissionInfo();// Permission IDuserInfo.id = "scope.userInfo";// Permission name and titleuserInfo.name = "Get your nickname and profile photo";// Permission descriptionuserInfo.description = "Get personal information to provide personalized services";// Permission denied textuserInfo.rejectDescription = "Deny";// The title displayed in the permission settings pageuserInfo.settingPageTitle = "User information";perms.add(userInfo);return perms;}}
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback