Search in sources :

Example 1 with SamlAcr

use of org.gluu.oxtrust.model.SamlAcr in project oxTrust by GluuFederation.

the class Shibboleth3ConfService method generateConfigurationFiles.

public boolean generateConfigurationFiles(SamlAcr[] acrs) {
    log.info(">>>>>>>>>> IN generateConfigurationFiles(SamlAcr[] acrs)...");
    if (appConfiguration.getShibboleth3IdpRootDir() == null) {
        throw new InvalidConfigurationException("Failed to update configuration due to undefined IDP root folder");
    }
    String idpConfAuthnFolder = getIdpConfAuthnDir();
    List<String> acrs2 = new ArrayList<String>();
    for (SamlAcr acr : acrs) acrs2.add(acr.getClassRef());
    VelocityContext context = new VelocityContext();
    context.put("acrs", acrs2);
    // Generate metadata-providers.xml
    String oxAuthSupportedPrincipals = generateConfFile(GLUU_SAML_OXAUTH_SUPPORTED_PRINCIPALS_FILE, context);
    boolean result = writeConfFile(idpConfAuthnFolder + GLUU_SAML_OXAUTH_SUPPORTED_PRINCIPALS_FILE, oxAuthSupportedPrincipals);
    log.info(">>>>>>>>>> LEAVING generateConfigurationFiles(SamlAcr[] acrs)...");
    return result;
}
Also used : VelocityContext(org.apache.velocity.VelocityContext) ArrayList(java.util.ArrayList) SamlAcr(org.gluu.oxtrust.model.SamlAcr) InvalidConfigurationException(org.gluu.util.exception.InvalidConfigurationException)

Example 2 with SamlAcr

use of org.gluu.oxtrust.model.SamlAcr in project oxTrust by GluuFederation.

the class SamlAcrAction method edit.

public void edit() {
    this.edit = true;
    this.samlAcr = new SamlAcr();
}
Also used : SamlAcr(org.gluu.oxtrust.model.SamlAcr)

Example 3 with SamlAcr

use of org.gluu.oxtrust.model.SamlAcr in project oxTrust by GluuFederation.

the class SamlAcrService method generateInumForSamlAcr.

public String generateInumForSamlAcr() {
    SamlAcr samlAcr = null;
    String newInum = null;
    String newDn = null;
    do {
        newInum = generateInumImpl();
        newDn = getDn(newInum);
        samlAcr = new SamlAcr();
        samlAcr.setDn(newDn);
    } while (persistenceEntryManager.contains(newDn, SamlAcr.class));
    return newInum;
}
Also used : SamlAcr(org.gluu.oxtrust.model.SamlAcr)

Aggregations

SamlAcr (org.gluu.oxtrust.model.SamlAcr)3 ArrayList (java.util.ArrayList)1 VelocityContext (org.apache.velocity.VelocityContext)1 InvalidConfigurationException (org.gluu.util.exception.InvalidConfigurationException)1