@Override
  public void authenticate(
      Context context,
      AuthProviderType authProviderType,
      SocializeAuthListener authListener,
      String... permissions) {
    SocializeConfig config = getConfig();
    String consumerKey = config.getProperty(SocializeConfig.SOCIALIZE_CONSUMER_KEY);
    String consumerSecret = config.getProperty(SocializeConfig.SOCIALIZE_CONSUMER_SECRET);

    if (permissions.length > 0) {
      if (!Arrays.equals(permissions, FacebookService.DEFAULT_PERMISSIONS)) {
        // Ensure the requested permissions include the default permissions
        Set<String> all = new HashSet<String>();
        all.addAll(Arrays.asList(permissions));
        all.addAll(Arrays.asList(FacebookService.DEFAULT_PERMISSIONS));
        permissions = all.toArray(new String[all.size()]);
      }
    }

    AuthProviderInfo authProviderInfo =
        authProviderInfoBuilder.getFactory(authProviderType).getInstance(permissions);

    authenticate(context, consumerKey, consumerSecret, authProviderInfo, authListener);
  }
  @Override
  public SocializeSession authenticate(String endpoint, String key, String secret, String uuid)
      throws SocializeException {

    if (authProviderDataFactory == null) {
      throw new SocializeException("Socialize not initialized");
    }

    AuthProviderData data = authProviderDataFactory.getBean();

    if (data == null) {
      throw new SocializeException("Socialize not initialized");
    }

    data.setAuthProviderInfo(
        authProviderInfoBuilder.getFactory(AuthProviderType.SOCIALIZE).getInstance());
    return authenticate(endpoint, key, secret, data, uuid);
  }
 protected void verify3rdPartyAuthConfigured() {
   authProviderInfoBuilder.validateAll();
 }
 @Override
 public boolean isSupported(AuthProviderType type) {
   return authProviderInfoBuilder.isSupported(type);
 }