Search in sources :

Example 1 with SendSingleLogOutElement

use of com.sun.identity.liberty.ws.disco.jaxb11.SendSingleLogOutElement in project OpenAM by OpenRock.

the class SMDiscoveryServiceData method getDirectiveEntry.

/**
     * Returns map of directive entries.
     *
     * @return map of directive entries.
     */
public static Map getDirectiveEntry(DiscoEntryElement entry) {
    Map map = Collections.EMPTY_MAP;
    List directiveList = entry.getAny();
    if ((directiveList != null) && !directiveList.isEmpty()) {
        map = new HashMap(directiveList.size() * 2);
        for (Iterator iter = directiveList.iterator(); iter.hasNext(); ) {
            Object obj = iter.next();
            ;
            if (obj instanceof AuthenticateRequesterElement) {
                AuthenticateRequesterElement dType = (AuthenticateRequesterElement) obj;
                setDirectiveData(dType, map, DiscoConstants.AUTHN_DIRECTIVE);
            } else if (obj instanceof EncryptResourceIDElement) {
                EncryptResourceIDElement dType = (EncryptResourceIDElement) obj;
                setDirectiveData(dType, map, DiscoConstants.ENCRYPT_DIRECTIVE);
            } else if (obj instanceof AuthenticateSessionContextElement) {
                AuthenticateSessionContextElement dType = (AuthenticateSessionContextElement) obj;
                setDirectiveData(dType, map, DiscoConstants.SESSION_DIRECTIVE);
            } else if (obj instanceof AuthorizeRequesterElement) {
                AuthorizeRequesterElement dType = (AuthorizeRequesterElement) obj;
                setDirectiveData(dType, map, DiscoConstants.AUTHZ_DIRECTIVE);
            } else if (obj instanceof GenerateBearerTokenElement) {
                GenerateBearerTokenElement dType = (GenerateBearerTokenElement) obj;
                setDirectiveData(dType, map, DiscoConstants.BEARER_DIRECTIVE);
            } else if (obj instanceof SendSingleLogOutElement) {
                SendSingleLogOutElement dType = (SendSingleLogOutElement) obj;
                setDirectiveData(dType, map, DiscoConstants.LOGOUT_DIRECTIVE);
            } else {
                debug.error("unsupported directive type");
            }
        }
    }
    return map;
}
Also used : GenerateBearerTokenElement(com.sun.identity.liberty.ws.disco.jaxb11.GenerateBearerTokenElement) SendSingleLogOutElement(com.sun.identity.liberty.ws.disco.jaxb11.SendSingleLogOutElement) HashMap(java.util.HashMap) EncryptResourceIDElement(com.sun.identity.liberty.ws.disco.jaxb.EncryptResourceIDElement) Iterator(java.util.Iterator) AuthenticateRequesterElement(com.sun.identity.liberty.ws.disco.jaxb.AuthenticateRequesterElement) ArrayList(java.util.ArrayList) List(java.util.List) AuthenticateSessionContextElement(com.sun.identity.liberty.ws.disco.jaxb.AuthenticateSessionContextElement) HashMap(java.util.HashMap) Map(java.util.Map) AuthorizeRequesterElement(com.sun.identity.liberty.ws.disco.jaxb.AuthorizeRequesterElement)

Example 2 with SendSingleLogOutElement

use of com.sun.identity.liberty.ws.disco.jaxb11.SendSingleLogOutElement in project OpenAM by OpenRock.

the class SMDiscoEntryData method createDirectivesEntry.

private void createDirectivesEntry(DiscoEntryElement de, List descriptionTypeList) throws JAXBException, AMConsoleException {
    if ((directives != null) && !directives.isEmpty()) {
        Set set = directives.keySet();
        for (Iterator iter = set.iterator(); iter.hasNext(); ) {
            String dName = (String) iter.next();
            List idRefs = (List) directives.get(dName);
            if (dName.equals(DiscoConstants.AUTHN_DIRECTIVE)) {
                AuthenticateRequesterElement authenticateRequester = discoFac.createAuthenticateRequesterElement();
                createDirectiveEntry(de, authenticateRequester, idRefs, descriptionTypeList);
            } else if (dName.equals(DiscoConstants.ENCRYPT_DIRECTIVE)) {
                EncryptResourceIDElement encryptResourceId = discoFac.createEncryptResourceIDElement();
                createDirectiveEntry(de, encryptResourceId, idRefs, descriptionTypeList);
            } else if (dName.equals(DiscoConstants.SESSION_DIRECTIVE)) {
                AuthenticateSessionContextElement authSessionCntx = discoFac.createAuthenticateSessionContextElement();
                createDirectiveEntry(de, authSessionCntx, idRefs, descriptionTypeList);
            } else if (dName.equals(DiscoConstants.AUTHZ_DIRECTIVE)) {
                AuthorizeRequesterElement authorizeRequester = discoFac.createAuthorizeRequesterElement();
                createDirectiveEntry(de, authorizeRequester, idRefs, descriptionTypeList);
            } else if (dName.equals(DiscoConstants.BEARER_DIRECTIVE)) {
                GenerateBearerTokenElement bearer = disco11Fac.createGenerateBearerTokenElement();
                createDirectiveEntry(de, bearer, idRefs, descriptionTypeList);
            } else if (dName.equals(DiscoConstants.LOGOUT_DIRECTIVE)) {
                SendSingleLogOutElement logout = disco11Fac.createSendSingleLogOutElement();
                createDirectiveEntry(de, logout, idRefs, descriptionTypeList);
            }
        }
    }
}
Also used : GenerateBearerTokenElement(com.sun.identity.liberty.ws.disco.jaxb11.GenerateBearerTokenElement) SendSingleLogOutElement(com.sun.identity.liberty.ws.disco.jaxb11.SendSingleLogOutElement) HashSet(java.util.HashSet) Set(java.util.Set) EncryptResourceIDElement(com.sun.identity.liberty.ws.disco.jaxb.EncryptResourceIDElement) Iterator(java.util.Iterator) AuthenticateRequesterElement(com.sun.identity.liberty.ws.disco.jaxb.AuthenticateRequesterElement) ArrayList(java.util.ArrayList) List(java.util.List) AuthenticateSessionContextElement(com.sun.identity.liberty.ws.disco.jaxb.AuthenticateSessionContextElement) AuthorizeRequesterElement(com.sun.identity.liberty.ws.disco.jaxb.AuthorizeRequesterElement)

Aggregations

AuthenticateRequesterElement (com.sun.identity.liberty.ws.disco.jaxb.AuthenticateRequesterElement)2 AuthenticateSessionContextElement (com.sun.identity.liberty.ws.disco.jaxb.AuthenticateSessionContextElement)2 AuthorizeRequesterElement (com.sun.identity.liberty.ws.disco.jaxb.AuthorizeRequesterElement)2 EncryptResourceIDElement (com.sun.identity.liberty.ws.disco.jaxb.EncryptResourceIDElement)2 GenerateBearerTokenElement (com.sun.identity.liberty.ws.disco.jaxb11.GenerateBearerTokenElement)2 SendSingleLogOutElement (com.sun.identity.liberty.ws.disco.jaxb11.SendSingleLogOutElement)2 ArrayList (java.util.ArrayList)2 Iterator (java.util.Iterator)2 List (java.util.List)2 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Map (java.util.Map)1 Set (java.util.Set)1