Examples of GeronimoSecurityException


Examples of org.apache.geronimo.common.GeronimoSecurityException

        refreshGroups();
        try {
            groups.remove(groupPrincipal);
            store(groups, serverInfo.resolveServer(getGroupsURI()).toURL());
        } catch (Exception e) {
            throw new GeronimoSecurityException(
                    "Cannot remove group principal: " + e.getMessage());
        }
    }
View Full Code Here

Examples of org.apache.geronimo.security.GeronimoSecurityException

        if (defaultPrincipal == null) {
            AutoMapAssistant config = securityConfig.getAssistant();
            try {
                if (config != null) {
                    Set assistants = kernel.listGBeans(new ObjectName("geronimo.security:type=SecurityRealm,realm=" + config.getSecurityRealm()));
                    if (assistants.size() < 1 || assistants.size() > 1) throw new GeronimoSecurityException("Only one auto mapping assistant should match " + config.getSecurityRealm());

                    org.apache.geronimo.security.realm.AutoMapAssistant assistant = (org.apache.geronimo.security.realm.AutoMapAssistant) assistants.iterator().next();
                    org.apache.geronimo.security.deploy.Principal principal = assistant.obtainDefaultPrincipal();
                    defaultPrincipal = new DefaultPrincipal();
                    defaultPrincipal.setPrincipal(principal);
                    defaultPrincipal.setRealmName(((SecurityRealm)assistant).getRealmName());
                }
            } catch (MalformedObjectNameException e) {
                throw new GeronimoSecurityException("Bad object name geronimo.security:type=SecurityRealm,realm=" + config.getSecurityRealm());
            }

        }
        if (defaultPrincipal == null) throw new GeronimoSecurityException("Unable to generate default principal");

        return generateDefaultPrincipal(securityConfig, defaultPrincipal);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.