Search in sources :

Example 31 with SAMLv2Model

use of com.sun.identity.console.federation.model.SAMLv2Model in project OpenAM by OpenRock.

the class SAMLv2SPServicesViewBean method populateAssertionConsumer.

private void populateAssertionConsumer(List assertionConServices) {
    tblAssertionConsumerModel.clear();
    SAMLv2Model model = (SAMLv2Model) getModel();
    int numberOfRows = assertionConServices.size();
    for (int i = 0; i < numberOfRows; i++) {
        tblAssertionConsumerModel.appendRow();
        AssertionConsumerServiceElement acsElem = (AssertionConsumerServiceElement) assertionConServices.get(i);
        tblAssertionConsumerModel.setValue(TBL_DATA_DEFAULT, String.valueOf(acsElem.isIsDefault()));
        tblAssertionConsumerModel.setValue(TBL_DATA_TYPE, ((acsElem.getBinding()).substring(37)));
        tblAssertionConsumerModel.setValue(TBL_DATA_LABEL, ((acsElem.getBinding()).substring(37)));
        tblAssertionConsumerModel.setValue(TBL_DATA_LOCATION, acsElem.getLocation());
        tblAssertionConsumerModel.setValue(TBL_DATA_INDEX, Integer.toString(acsElem.getIndex()));
    }
}
Also used : AssertionConsumerServiceElement(com.sun.identity.saml2.jaxb.metadata.AssertionConsumerServiceElement) SAMLv2Model(com.sun.identity.console.federation.model.SAMLv2Model)

Example 32 with SAMLv2Model

use of com.sun.identity.console.federation.model.SAMLv2Model in project OpenAM by OpenRock.

the class SAMLv2IDPAdvancedViewBean method handleButton1Request.

public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    try {
        SAMLv2Model model = (SAMLv2Model) getModel();
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        //retrieve the extended metadata values from the property sheet
        Map idpExtValues = getExtendedValues();
        Map new_idpExtValues = ps.getAttributeValues(model.getIDPEXAdDataMap(), false, model);
        idpExtValues.putAll(new_idpExtValues);
        //save the extended metadata values for the Idp
        model.setIDPExtAttributeValues(realm, entityName, idpExtValues, location);
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "samlv2.idp.property.updated");
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    forwardTo();
}
Also used : AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) SAMLv2Model(com.sun.identity.console.federation.model.SAMLv2Model) HashMap(java.util.HashMap) Map(java.util.Map)

Example 33 with SAMLv2Model

use of com.sun.identity.console.federation.model.SAMLv2Model in project OpenAM by OpenRock.

the class SAMLv2IDPAssertionContentViewBean method getStandardValues.

private Map getStandardValues() {
    Map map = new HashMap();
    try {
        //gets standard metadata values
        SAMLv2Model model = (SAMLv2Model) getModel();
        map = model.getStandardIdentityProviderAttributes(realm, entityName);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    return map;
}
Also used : AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) SAMLv2Model(com.sun.identity.console.federation.model.SAMLv2Model)

Example 34 with SAMLv2Model

use of com.sun.identity.console.federation.model.SAMLv2Model in project OpenAM by OpenRock.

the class SAMLv2IDPAssertionContentViewBean method getExtendedValues.

private Map<String, Set<String>> getExtendedValues() {
    Map<String, Set<String>> extendedValues = new HashMap<>();
    try {
        SAMLv2Model model = (SAMLv2Model) getModel();
        Map<String, List<String>> attr = model.getExtendedIdentityProviderAttributes(realm, entityName);
        for (Map.Entry<String, List<String>> entry : attr.entrySet()) {
            extendedValues.put(entry.getKey(), convertListToSet(entry.getValue()));
        }
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    return extendedValues;
}
Also used : AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) SAMLv2Model(com.sun.identity.console.federation.model.SAMLv2Model)

Example 35 with SAMLv2Model

use of com.sun.identity.console.federation.model.SAMLv2Model in project OpenAM by OpenRock.

the class SAMLv2IDPServicesViewBean method getStandardValues.

private Map getStandardValues() {
    Map map = new HashMap();
    try {
        //gets standard metadata values
        SAMLv2Model model = (SAMLv2Model) getModel();
        map = model.getStandardIdentityProviderAttributes(realm, entityName);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    return map;
}
Also used : HashMap(java.util.HashMap) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashMap(java.util.HashMap) Map(java.util.Map) SAMLv2Model(com.sun.identity.console.federation.model.SAMLv2Model)

Aggregations

SAMLv2Model (com.sun.identity.console.federation.model.SAMLv2Model)53 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)41 Map (java.util.Map)33 HashMap (java.util.HashMap)29 AMPropertySheet (com.sun.identity.console.base.AMPropertySheet)28 List (java.util.List)14 Set (java.util.Set)11 Iterator (java.util.Iterator)9 ArrayList (java.util.ArrayList)7 CCAddRemoveModel (com.sun.web.ui.model.CCAddRemoveModel)3 HashSet (java.util.HashSet)3 AssertionConsumerServiceElement (com.sun.identity.saml2.jaxb.metadata.AssertionConsumerServiceElement)2 AMPropertySheetModel (com.sun.identity.console.base.model.AMPropertySheetModel)1 EncodeAction (com.sun.identity.security.EncodeAction)1 CCAddRemove (com.sun.web.ui.view.addremove.CCAddRemove)1 CCActionTable (com.sun.web.ui.view.table.CCActionTable)1