@Nullable
    @Bean
    public TurmsMongoClient userMongoClient(TurmsPropertiesManager propertiesManager) {
        TurmsProperties localProperties = propertiesManager.getLocalProperties();
        IdentityAccessManagementProperties authenticationProperties = localProperties.getGateway()
                .getSession()
                .getIdentityAccessManagement();
        // TODO: use global "enabled"
        if (!authenticationProperties.isEnabled()
                || authenticationProperties.getType() != IdentityAccessManagementType.PASSWORD) {
            return null;
        }
        MongoProperties properties = localProperties.getGateway()
                .getMongo()
                .getUser();
        TurmsMongoClient mongoClient = getMongoClient(properties,
                "user",
                Set.of(ClusterType.SHARDED, ClusterType.LOAD_BALANCED));
        mongoClient.registerEntitiesByClasses(User.class);
        return mongoClient;
    }
@return null if {@link IdentityAccessManagementProperties#enabled} is false or
        {@link IdentityAccessManagementProperties#type} is not
        {@link IdentityAccessManagementType#PASSWORD}
turms-gateway/src/main/java/im/turms/gateway/storage/mongo/MongoConfig.java