Search in sources :

Example 6 with SAMLv2Model

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

the class SAMLv2AffiliateViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTIES);
    ps.init();
    SAMLv2Model model = (SAMLv2Model) getModel();
    try {
        Map values = getStandardAffiliationValues();
        Set allSPEntities = model.getallSPEntities(realm);
        Set affiliateMembers = (Set) values.get(model.AFFILIATE_MEMBER);
        allSPEntities.removeAll(affiliateMembers);
        if (samladdRemoveModel == null) {
            samladdRemoveModel = new CCAddRemoveModel();
        }
        if ((allSPEntities != null) && !allSPEntities.isEmpty()) {
            samladdRemoveModel.setAvailableOptionList(createOptionList(allSPEntities));
        }
        if ((affiliateMembers != null) && !affiliateMembers.isEmpty()) {
            samladdRemoveModel.setSelectedOptionList(createOptionList(affiliateMembers));
        }
        ps.setAttributeValues(values, model);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    ps.setAttributeValues(getExtendedAffiliationValues(), model);
}
Also used : Set(java.util.Set) HashSet(java.util.HashSet) CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel) 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 7 with SAMLv2Model

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

the class SAMLv2IDPAssertionContentViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTIES);
    ps.init();
    SAMLv2Model model = (SAMLv2Model) getModel();
    ps.setAttributeValues(getStandardValues(), model);
    ps.setAttributeValues(getExtendedValues(), model);
    if (isHosted()) {
        SAMLv2AuthContexts authContexts = null;
        try {
            authContexts = model.getIDPAuthenticationContexts(realm, entityName);
        } catch (AMConsoleException e) {
            setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
        }
        populateAuthenticationContext(authContexts, tblAuthContextsModel, SAMLv2Model.IDP_AUTHN_CONTEXT_CLASS_REF_MAPPING_DEFAULT);
    }
}
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)

Example 8 with SAMLv2Model

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

the class SAMLv2IDPAssertionProcessingViewBean 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.getIDPEXAPDataMap(), 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 9 with SAMLv2Model

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

the class SAMLv2IDPServicesViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTIES);
    ps.init();
    SAMLv2Model model = (SAMLv2Model) getModel();
    ps.setAttributeValues(getStandardValues(), model);
    //only metalias from ext
    try {
        setDisplayFieldValue(model.IDP_META_ALIAS, model.getMetaalias(realm, entityName, EntityModel.IDENTITY_PROVIDER));
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
}
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)

Example 10 with SAMLv2Model

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

the class SAMLv2IDPServicesViewBean method handleButton1Request.

public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    try {
        SAMLv2Model model = (SAMLv2Model) getModel();
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        //retrieve the standard metadata values from the property sheet
        Map idpStdValues = ps.getAttributeValues(model.getStandardIdentityProviderAttributes(realm, entityName), false, model);
        //save the standard metadata values for the Idp
        model.setIDPStdAttributeValues(realm, entityName, idpStdValues);
        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)

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