public Config(SamlAuthorityConfiguration samlAuthorityConfig,TokenRestrictions tokenRestrictions,Collection<List<Certificate>> validCerts,long clockTolerance,Collection<IDPConfig> inExternalIdps){
  Validate.notNull(samlAuthorityConfig);
  Validate.notNull(tokenRestrictions);
  Validate.notEmpty(validCerts);
  List<Certificate> authorityCert=samlAuthorityConfig.getSigningCertificateChain();
  boolean authorityCertInValidCerts=false;
  for (  List<Certificate> currentChain : validCerts) {
    Validate.notEmpty(currentChain);
    Validate.noNullElements(currentChain);
    if (!authorityCertInValidCerts && currentChain.equals(authorityCert)) {
      authorityCertInValidCerts=true;
    }
  }
  Validate.isTrue(authorityCertInValidCerts,"signing certificate chain is not in valid chains.");
  Validate.isTrue(clockTolerance >= 0);
  this.samlAuthorityConfig=samlAuthorityConfig;
  this.validCerts=validCerts;
  this.clockTolerance=clockTolerance;
  this.tokenRestrictions=tokenRestrictions;
  HashMap<String,IDPConfig> idpsSet=new HashMap<String,IDPConfig>();
  if (inExternalIdps != null) {
    for (    IDPConfig conf : inExternalIdps) {
      if (conf != null) {
        idpsSet.put(conf.getEntityID(),conf);
      }
    }
  }
  this.externalIdps=Collections.unmodifiableMap(idpsSet);
}

public Config ( SamlAuthorityConfiguration samlAuthorityConfig , TokenRestrictions tokenRestrictions , Collection < List < Certificate > > validCerts , long clockTolerance , Collection < IDPConfig > inExternalIdps ) { Validate . notNull ( samlAuthorityConfig ) ; Validate . notNull ( tokenRestrictions ) ; Validate . notEmpty ( validCerts ) ; List < Certificate > authorityCert = samlAuthorityConfig . getSigningCertificateChain ( ) ; boolean authorityCertInValidCerts = false ; for ( List < Certificate > currentChain : validCerts ) { Validate . notEmpty ( currentChain ) ; Validate . noNullElements ( currentChain ) ; if ( ! authorityCertInValidCerts && currentChain . equals ( authorityCert ) ) { authorityCertInValidCerts = true ; } } Validate . isTrue ( authorityCertInValidCerts , "signing certificate chain is not in valid chains." ) ; Validate . isTrue ( clockTolerance >= 0 ) ; this . samlAuthorityConfig = samlAuthorityConfig ; this . validCerts = validCerts ; this . clockTolerance = clockTolerance ; this . tokenRestrictions = tokenRestrictions ; HashMap < String , IDPConfig > idpsSet = new HashMap < String , IDPConfig > ( ) ; if ( inExternalIdps != null ) { for ( IDPConfig conf : inExternalIdps ) { if ( conf != null ) { idpsSet . put ( conf . getEntityID ( ) , conf ) ; } } } this . externalIdps = Collections . unmodifiableMap ( idpsSet ) ; }
creates a new configuration
