Configure OAuth client.

@param properties the properties
973979
protected void configureOAuth20Client(final Collection<BaseClient> properties) {
        val index = new AtomicInteger();
        pac4jProperties.getOauth2()
            .stream()
            .filter(oauth -> StringUtils.isNotBlank(oauth.getId()) && StringUtils.isNotBlank(oauth.getSecret()))
            .forEach(oauth -> {
                val client = new GenericOAuth20Client();
                client.setKey(oauth.getId());
                client.setSecret(oauth.getSecret());
                client.setProfileAttrs(oauth.getProfileAttrs());
                client.setProfileNodePath(oauth.getProfilePath());
                client.setProfileUrl(oauth.getProfileUrl());
                client.setProfileVerb(Verb.valueOf(oauth.getProfileVerb().toUpperCase()));
                client.setTokenUrl(oauth.getTokenUrl());
                client.setAuthUrl(oauth.getAuthUrl());
                client.setCustomParams(oauth.getCustomParams());
                val count = index.intValue();
                if (StringUtils.isBlank(oauth.getClientName())) {
                    client.setName(client.getClass().getSimpleName() + count);
                }
                client.setCallbackUrlResolver(new PathParameterCallbackUrlResolver());
                configureClient(client, oauth);

                index.incrementAndGet();
                LOGGER.debug("Created client [{}]", client);
                properties.add(client);
            });
    }
846789
public void setProperties(Map<String, Object> properties)
    {
        Record recUserRegistration = this.getUserRegistration();
        ((PropertiesField)recUserRegistration.getField(UserRegistrationModel.PROPERTIES)).setProperties(properties);
    }
1225460
protected void configureBitBucketClient(final Collection<BaseClient> properties) {
        val bb = pac4jProperties.getBitbucket();
        if (StringUtils.isNotBlank(bb.getId()) && StringUtils.isNotBlank(bb.getSecret())) {
            val client = new BitbucketClient(bb.getId(), bb.getSecret());
            configureClient(client, bb);

            LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
            properties.add(client);
        }
    }
1129848
public void setProperties(Properties properties) throws ConfigurationException {
//		initialRequest = application.getCurrentRequest();
		autoReload = Boolean.valueOf(properties.getProperty("autoreload", "true"));

		defaultMappingName = properties.getProperty("defaultmapping", defaultMappingName);

/*		strict = section.getValue("strict", new GenericValue(strict), "abort mapping loading on errors").toBoolean().booleanValue();
        Environment.System.out.println("checking mapping strictly: " + strict);*/

		mappingFilesMap = PropertiesSupport.getSubsection(properties, "mapping");
	}
56585
protected void configureFacebookClient(final Collection<BaseClient> properties) {
        val fb = pac4jProperties.getFacebook();
        if (StringUtils.isNotBlank(fb.getId()) && StringUtils.isNotBlank(fb.getSecret())) {
            val client = new FacebookClient(fb.getId(), fb.getSecret());

            configureClient(client, fb);
            if (StringUtils.isNotBlank(fb.getScope())) {
                client.setScope(fb.getScope());
            }

            if (StringUtils.isNotBlank(fb.getFields())) {
                client.setFields(fb.getFields());
            }
            LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
            properties.add(client);
        }
    }
860042
private void setAuthenticationHeaders(Object soapClient, AdManagerSession adManagerSession)
      throws AuthenticationException {
    authorizationHeaderHandler.setAuthorization(soapClient, adManagerSession);
  }
1071802
public Configuration withProperties(java.util.Map<String, String> properties) {
        setProperties(properties);
        return this;
    }
860971
public void setProperties(Map<String, Object> properties)
    {
        if (this.getTask() != null)
            this.getTask().setProperties(properties);
    }
1181141
@SuppressWarnings("unchecked")
    public void raConfigure(ConfigProperties properties) {
        String httpClientFactoryClassName = (String) properties.getProperty(CFG_PROPERTY_HTTP_CLIENT_FACTORY)
                .getValue();
        if (!httpClientFactoryClassName.isEmpty()) {
            try {
                httpClientFactory = ((Class<? extends HttpAsyncClientFactory>) Class
                        .forName(httpClientFactoryClassName)).newInstance();
            } catch (Exception e) {
                tracer.severe("failed to load http client factory class", e);
            }
        } else {
            this.maxTotal = (Integer) properties.getProperty(CFG_PROPERTY_MAX_CONNECTIONS_TOTAL).getValue();
            this.defaultMaxPerRoute = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_MAX_CONNECTIONS_PER_ROUTE)
                    .getValue();
            this.connectTimeout = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_CONNECT_TIMEOUT).getValue();
            this.socketTimeout = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_SOCKET_TIMEOUT).getValue();
        }
    }
1098962
protected void configureOrcidClient(final Collection<BaseClient> properties) {
        val db = pac4jProperties.getOrcid();
        if (StringUtils.isNotBlank(db.getId()) && StringUtils.isNotBlank(db.getSecret())) {
            val client = new OrcidClient(db.getId(), db.getSecret());
            configureClient(client, db);

            LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
            properties.add(client);
        }
    }
407025
static void setAuthParams(String appKey, String desiredUid,
                              String[] alreadyAuthedUids, String webHost, String apiType) {
        setAuthParams(appKey, desiredUid, alreadyAuthedUids, null, null, null);
    }
917235
public final void setHeaderProperties(Properties headerProperties)
    {
        this.headerProperties=null;
        if(headerProperties!=null)
        {
            this.headerProperties=new Properties();
            this.headerProperties.putAll(headerProperties);
        }
    }
596322
protected void passivateProxy( Object pProperties )
    {
        if ( pProperties == null )
        {
            return;
        }
        @SuppressWarnings( "unchecked" )
        final List<String> properties = (List<String>) pProperties;
        for ( Iterator<String> iter = properties.iterator(); iter.hasNext(); )
        {
            final String key = iter.next();
            final String value = iter.next();
            setProperty( null, key, value );
        }
    }
923963
public void setProperties(Collection<String> properties) {
        if (null == this.properties) {
            this.properties = new ArrayList<>();
        }
        this.properties.clear();
        this.properties.addAll(properties);
    }
261252
public static void configureExample(String host, int port, String user, String password, Authentication authType)
    throws IOException, ResourceNotFoundException, ForbiddenUserException, FailedRequestException, ResourceNotResendableException
  {
    // create the client
    DatabaseClient client = DatabaseClientFactory.newClient(host, port, user, password, authType);

    installResourceExtension(client);

    configureQueryOptions(client);

    setUpExample(client);

    // release the client
    client.release();
  }
598674
protected void configureGoogleClient(final Collection<BaseClient> properties) {
        val google = pac4jProperties.getGoogle();
        val client = new Google2Client(google.getId(), google.getSecret());
        if (StringUtils.isNotBlank(google.getId()) && StringUtils.isNotBlank(google.getSecret())) {
            configureClient(client, google);
            if (StringUtils.isNotBlank(google.getScope())) {
                client.setScope(Google2Client.Google2Scope.valueOf(google.getScope().toUpperCase()));
            }

            LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
            properties.add(client);
        }
    }
87850
public function setOAuthParameters(array $oauthParameters)
    {
        foreach ($oauthParameters as $name => $value) {
            $this->setOAuthParameter($name, $value);
        }
    }