Set the strategy used to locate the {@link ProxyIdpAuthenticationContext}.

@param strategy
strategy used to locate the {@link ProxyIdpAuthenticationContext}
190965
public void setProxyIdpAuthenticationContextLookupStrategy(
      final Function<AuthenticationContext, ProxyIdpAuthenticationContext> strategy) {
    ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
    this.proxyIdpAuthenticationContextLookupStrategy = Constraint.isNotNull(strategy,
      "ProxyIdPAuthenticationContext lookup strategy cannot be null");
  }
542300
function Strategy (options, verify) {
  if (typeof options === 'function') {
    verify = options
    options = {}
  } else {
    if (options && options.log) {
      log = options.log
    }
  }
  if (!verify) {
    throw new Error('apikey authentication strategy requires a verify function')
  }

  passport.Strategy.call(this)

  this._apiKeyHeader = options.apiKeyHeader || 'api_key'
  this.name = 'apikey'
  this._verify = verify
  this._passReqToCallback = true
}
700828
public ObjectMarshallingStrategy getStrategyObject(String strategyName) {
        if( StringUtils.isEmpty(strategyName) ) { 
            return null;
        }
        if (strategyName.startsWith("org.drools.marshalling.impl")) {
            strategyName = strategyName.replaceFirst("org.drools.marshalling.impl", "org.drools.core.marshalling.impl");
        }
        
        for( int i = 0; i < this.strategiesList.length; ++i ) { 
        	 if( strategiesList[i].getName().equals(strategyName) ) {
            		return strategiesList[i];
            }
        }
        throw new RuntimeException( "Unable to find PlaceholderResolverStrategy for name : " + strategyName );
    }
28915
function Strategy(options, verifyPublic) {
  if (typeof options == 'function') {
    verifyPublic = options;
    options = {};
  }
  if (!verifyPublic) throw new Error('OAuth 2.0 public client strategy requires a verifyPublic function');

  passport.Strategy.call(this);
  this.name = 'oauth2-public-client';
  this._verifyPublic = verifyPublic;
  this._passReqToCallback = options.passReqToCallback;
}
1127919
public AuthSource findByStrategy(String strategy) {
    EntityManager entityManager = getEntityManager();
    
    CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
    CriteriaQuery<AuthSource> criteria = criteriaBuilder.createQuery(AuthSource.class);
    Root<AuthSource> root = criteria.from(AuthSource.class);
    criteria.select(root);
    criteria.where(
      criteriaBuilder.equal(root.get(AuthSource_.strategy), strategy)
    );

    return getSingleResult(entityManager.createQuery(criteria)); 
  }
793385
function Strategy(options, verify) {
  if (typeof options == 'function') {
    verify = options;
    options = {};
  }
  if (!verify) throw new Error('OAuth 2.0 client password strategy requires a verify function');

  passport.Strategy.call(this);
  this.name = 'oauth2-client-password';
  this._verify = verify;
  this._passReqToCallback = options.passReqToCallback;
}
874705
public function strategy($strategy = null)
    {
        if (is_null($strategy)) {
            $strategy = $this->defaultStrategy ?: OrderStrategy::class;
        }

        if (!class_exists($strategy)) {
            $strategy = __NAMESPACE__ . '\strategies\\' . ucfirst($strategy);
        }

        if (!class_exists($strategy)) {
            throw new InvalidArgumentException("Unsupported strategy \"{$strategy}\"");
        }

        if (empty($this->strategies[$strategy]) || !($this->strategies[$strategy] instanceof StrategyInterface)) {
            $this->strategies[$strategy] = new $strategy($this);
        }

        return $this->strategies[$strategy];
    }
53485
@Nonnull
    @Override
    public NodeProvisioner.StrategyDecision apply(@Nonnull NodeProvisioner.StrategyState strategyState) {
        LOG.debug("Applying provisioning.");
        final Label label = strategyState.getLabel();
        LoadStatisticsSnapshot snapshot = strategyState.getSnapshot();

        List<DockerCloud> provisionClouds;
        DockerCloudOrder cloudOrder = dockerGlobalConfig().getCloudOrder();
        if (isNull(cloudOrder)) {
            provisionClouds = DEFAULT.getDockerClouds(label);
        } else {
            provisionClouds = cloudOrder.getDockerClouds(label);
        }

        for (DockerCloud dockerCloud : provisionClouds) {
            for (DockerSlaveTemplate template : dockerCloud.getTemplates(label)) {
                if (notAllowedStrategy(template)) {
                    continue;
                }

                int availableCapacity = snapshot.getAvailableExecutors() +
                        snapshot.getConnectingExecutors() +
                        strategyState.getAdditionalPlannedCapacity() +
                        strategyState.getPlannedCapacitySnapshot();

                int currentDemand = snapshot.getQueueLength();

                LOG.debug("Available capacity={}, currentDemand={}", availableCapacity, currentDemand);

                if (availableCapacity < currentDemand) {
                    // may happen that would be provisioned with other template
                    Collection<PlannedNode> plannedNodes = dockerCloud.provision(label, currentDemand - availableCapacity);
                    LOG.debug("Planned {} new nodes", plannedNodes.size());

                    strategyState.recordPendingLaunches(plannedNodes);
                    // FIXME calculate executors number?
                    availableCapacity += plannedNodes.size();
                    LOG.debug("After '{}' provisioning, available capacity={}, currentDemand={}",
                            dockerCloud, availableCapacity, currentDemand);
                }

                if (availableCapacity >= currentDemand) {
                    LOG.debug("Provisioning completed");
                    return NodeProvisioner.StrategyDecision.PROVISIONING_COMPLETED;
                } else {
                    LOG.debug("Provisioning not complete, trying next template");
                }
            }

            LOG.debug("Provisioning not complete, trying next YAD Cloud");
        }

        LOG.debug("Provisioning not complete, consulting remaining strategies");
        return NodeProvisioner.StrategyDecision.CONSULT_REMAINING_STRATEGIES;
    }
262267
public void addStrategy(MappingStrategy strategy)
    {
        if (strategies == null)
        {
            strategies = new ArrayList<>();
        }
        strategies.add(strategy);
    }
1315099
protected void setProxyID(short s)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setProxyID", ""+s);
      proxyID = s;
      proxyIDSet = true;
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setProxyID");
   }
476015
function OpenIDStrategy (provider, verify) {
  this.provider = provider
  this.name = provider.id
  if (!provider.returnURL) {
    provider.returnURL = provider.callbackURL
  }
  Strategy.call(this, provider, verify)
  this.client = provider
  this.verify = verify
}
99388
@Override
    public STRATEGYSTAGETYPE resolve(String... coordinates) throws IllegalArgumentException, ResolutionException {
        return delegate.resolve(coordinates);
    }
983810
def add(cache, strategy)
      c = cache.to_sym
      s = strategy.to_sym

      fail Exceptions::UnknownCachingStrategy, "Unknown caching strategy \":#{strategy}\" given. Did you register it in advance?"  unless caching_strategies.key?(strategy)

      caches[c] = caching_strategies[s].new
      caches[c]
    end
1185001
public function optimisticLocking(IOptimisticLockingStrategy $strategy)
    {
        foreach ($strategy->getLockingColumnNames() as $columnName) {
            if (!isset($this->columns[$columnName])) {
                throw InvalidArgumentException::format(
                    'Cannot add optimistic locking strategy: expecting one of columns (%s), \'%s\' given',
                    Debug::formatValues(array_keys($this->columns)), $columnName
                );
            }
        }

        $this->lockingStrategies[] = $strategy;
    }
563230
function Strategy(options, verify) {

  if (typeof options != 'object') options = {};

  if (!options.secretOrPublicKey) throw new TypeError(
    'JwtCookieComboStrategy requires a secret or public key'
  );

  if (!verify) throw new TypeError(
    'JwtCookieComboStrategy requires a verify callback'
  );

  passport.Strategy.call(this);

  this.name = 'jwt-cookiecombo';
  this._verify = verify;

  this._jwtVerifyOptions = Object.assign({}, options.jwtVerifyOptions);
  this._passReqToCallback = options.passReqToCallback || false;
  this._jwtHeaderKey = options.jwtHeaderKey || 'authorization';
  this._jwtCookieName = options.jwtCookieName || 'jwt';
  this._jwtCookieSecure = options.jwtCookieSecure !== false;
  this._secretOrPublicKey = options.secretOrPublicKey;

  this._jwtHeaderKey = this._jwtHeaderKey.toLowerCase();

}
759209
public JsonSet withIdStrategy(IdStrategy strategy) {
        this.strategy = strategy;
        if(size()>0) {
            JsonSet seen=new JsonSet().withIdStrategy(strategy);
            Iterator<JsonElement> iterator = this.iterator();
            while (iterator.hasNext()) {
                JsonElement e = iterator.next();
                if(seen.contains(e)) {
                    iterator.remove();
                } else {
                    seen.add(e);
                }
            }
        }
        return this;
    }
533548
function Strategy(options, keying, verify) {
  if (typeof options === 'function') {
    verify = keying;
    keying = options;
    options = undefined;
  }
  options = options || {};

  var audience = options.audience;

  if (!audience) {
    throw new TypeError('OAuth 2.0 JWT bearer strategy requires an audience option');
  }
  if (!keying) {
    throw new TypeError('OAuth 2.0 JWT bearer strategy requires a keying callback');
  }
  if (!verify) {
    throw new TypeError('OAuth 2.0 JWT bearer strategy requires a verify callback');
  }

  if (!Array.isArray(audience)) {
    audience = [ audience ];
  }

  passport.Strategy.call(this);
  this.name = 'oauth2-jwt-bearer';
  this._audience = audience;
  this._keying = keying;
  this._verify = verify;
  this.jwtAlgorithm = options.jwtAlgorithm || 'RS256';

  this._passReqToCallback = options.passReqToCallback;
}