# Manage registration whitelist

Configure a registration whitelist for your user pool, which is similar to the invitation registration rule. After opening, only users in the whitelist can register. Authing currently supports whitelisting methods such as mobile phone number, email address, and user name.

# Get whitelist records

WhitelistManagementClient().list(type)

Get whitelist record

# Parameters

  • type <WhitelistType> Whitelist type, USERNAME is the user name, EMAIL is the mailbox, PHONE is the mobile phone number

# Example

List<WhiteList> whiteLists = managementClient.whitelist().list(WhitelistType.USERNAME).execute();

# Add whitelist

WhitelistManagementClient().add(addWhitelistParam)

Add whitelist

# Parameters

  • addWhitelistParam <AddWhitelistParam>
  • addWhitelistParam.type <WhitelistType> Whitelist type, USERNAME is the user name, EMAIL is the mailbox, PHONE is the mobile phone number
  • addWhitelistParam.list <string[]> Whitelist list, please note that the mailbox is not case sensitive

# Example

List<WhiteList> whiteLists = managementClient.whitelist().add(new AddWhitelistParam(WhitelistType.USERNAME, Arrays.asList("test1"))).execute();

# Remove whitelist

WhitelistManagementClient().remove(removeWhitelistParam)

Remove whitelist

# Parameters

  • removeWhitelistParam <RemoveWhitelistParam>
  • removeWhitelistParam.type <WhitelistType> Whitelist type, USERNAME is the user name, EMAIL is the mailbox, PHONE is the mobile phone number
  • removeWhitelistParam.list <string[]> Whitelist list, please note that the mailbox is not case sensitive.

# Example

List<WhiteList> whiteLists = managementClient.whitelist().remove(new RemoveWhitelistParam(WhitelistType.USERNAME, Arrays.asList("test"))).execute();

# Open whitelist

WhitelistManagementClient().enable(type)

Open whitelist

# Parameters

  • type <WhitelistType> Whitelist type, USERNAME is the user name, EMAIL is the mailbox, PHONE is the mobile phone number

# Example

UserPool userPool = managementClient.whitelist().enable(WhitelistType.USERNAME).execute();

# Close whitelist

WhitelistManagementClient().disable(type)

Close whitelist

# Parameters

  • type <WhitelistType> Whitelist type, USERNAME is the user name, EMAIL is the mailbox, PHONE is the mobile phone number

# Example

UserPool userPool = managementClient.whitelist().disable(WhitelistType.USERNAME).execute();