All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.gravitee.am.identityprovider.facebook.model.FacebookUser Maven / Gradle / Ivy

There is a newer version: 4.6.0-alpha.2
Show newest version
/**
 * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.gravitee.am.identityprovider.facebook.model;

import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * Facebook User claims
 *
 * See User reference
 * See  BASE_FIELD_LIST = Arrays.asList(ID, FIRST_NAME, LAST_NAME, MIDDLE_NAME, NAME, NAME_FORMAT, PICTURE, SHORT_NAME,
            EMAIL, AGE_RANGE, BIRTHDAY, GENDER, LINK, LOCATION);

    /**
     * Contains all others fields we can retrieve and store as additional information.
     */
    public static final List OTHER_FIELDS_LIST = Arrays.asList(ABOUT, INSTALLED, INSTALL_TYPE, IS_GUEST_USER, LANGUAGES,
            PUBLIC_KEY, QUOTES, SHARED_LOGIN_UPGRADE_REQUIRED_BY, SIGNIFICANT_OTHER, SPORTS, SUPPORTS_DONATE_BUTTON_IN_LIVE_VIDEO);

    /**
     * Contains all fields we have to retrieve from Facebook api.
     */
    public static final List ALL_FIELDS_LIST = Stream.of(BASE_FIELD_LIST, OTHER_FIELDS_LIST).flatMap(Collection::stream).collect(Collectors.toList());

    /**
     * Contains all field names coma-separated.
     */
    public static final String ALL_FIELDS_PARAM = String.join(",", ALL_FIELDS_LIST).replace(LOCATION, LOCATION_ALL_FIELDS_PARAM);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy