Search in sources :

Example 16 with SAMLv2Model

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

the class SAMLv2AffiliateViewBean method getStandardAffiliationValues.

private Map getStandardAffiliationValues() {
    Map map = new HashMap();
    try {
        SAMLv2Model model = (SAMLv2Model) getModel();
        map = model.getStandardAffiliationAttributes(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)

Example 17 with SAMLv2Model

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

the class SAMLv2AttrAuthorityViewBean method getStandardAttriAuthorityValues.

private Map getStandardAttriAuthorityValues() {
    Map map = new HashMap();
    try {
        SAMLv2Model model = (SAMLv2Model) getModel();
        map = model.getStandardAttributeAuthorityAttributes(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)

Example 18 with SAMLv2Model

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

the class SAMLv2SPAssertionContentViewBean 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.getSPAuthenticationContexts(realm, entityName);
        } catch (AMConsoleException e) {
            setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
        }
        populateAuthenticationContext(authContexts, tblAuthContextsModel, SAMLv2Model.SP_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 19 with SAMLv2Model

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

the class SAMLv2SPAssertionContentViewBean method getExtendedValues.

private Map getExtendedValues() {
    Map extendedValues = new HashMap();
    try {
        //gets extended metadata values
        SAMLv2Model model = (SAMLv2Model) getModel();
        Map attrs = model.getExtendedServiceProviderAttributes(realm, entityName);
        Set entries = attrs.entrySet();
        Iterator iterator = entries.iterator();
        //the list of values is converted to a set
        while (iterator.hasNext()) {
            Map.Entry entry = (Map.Entry) iterator.next();
            extendedValues.put((String) entry.getKey(), convertListToSet((List) entry.getValue()));
        }
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    return extendedValues;
}
Also used : Set(java.util.Set) HashMap(java.util.HashMap) Iterator(java.util.Iterator) ArrayList(java.util.ArrayList) List(java.util.List) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashMap(java.util.HashMap) Map(java.util.Map) SAMLv2Model(com.sun.identity.console.federation.model.SAMLv2Model)

Example 20 with SAMLv2Model

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

the class SAMLv2SPAssertionProcessingViewBean method getExtendedValues.

private Map getExtendedValues() {
    Map extendedValues = new HashMap();
    try {
        //gets extended metadata values
        SAMLv2Model model = (SAMLv2Model) getModel();
        Map attrs = model.getExtendedServiceProviderAttributes(realm, entityName);
        Set entries = attrs.entrySet();
        Iterator iterator = entries.iterator();
        //the list of values is converted to a set
        while (iterator.hasNext()) {
            Map.Entry entry = (Map.Entry) iterator.next();
            extendedValues.put((String) entry.getKey(), convertListToSet((List) entry.getValue()));
        }
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    return extendedValues;
}
Also used : Set(java.util.Set) HashMap(java.util.HashMap) Iterator(java.util.Iterator) List(java.util.List) 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