Examples of GerDefaultPrincipalType


Examples of org.apache.geronimo.xbeans.geronimo.security.GerDefaultPrincipalType

        return security;
    }

    //used from app client builder
    public DefaultPrincipal buildDefaultPrincipal(XmlObject xmlObject) {
        GerDefaultPrincipalType defaultPrincipalType = (GerDefaultPrincipalType) xmlObject;
        DefaultPrincipal defaultPrincipal = new DefaultPrincipal();

        if(defaultPrincipalType.isSetPrincipal()) {
            defaultPrincipal.setPrincipal(buildPrincipal(defaultPrincipalType.getPrincipal()));
        } else if(defaultPrincipalType.isSetLoginDomainPrincipal()) {
            defaultPrincipal.setPrincipal(buildDomainPrincipal(defaultPrincipalType.getLoginDomainPrincipal()));
        } else if(defaultPrincipalType.isSetRealmPrincipal()) {
            defaultPrincipal.setPrincipal(buildRealmPrincipal(defaultPrincipalType.getRealmPrincipal()));
        } else {
            throw new IllegalStateException("default-principal does not contain a principal, login-domain-principal, or realm-principal");
        }
        GerNamedUsernamePasswordCredentialType[] namedCredentials = defaultPrincipalType.getNamedUsernamePasswordCredentialArray();
        if (namedCredentials.length > 0) {
            Set defaultCredentialSet = new HashSet();
            for (int i = 0; i < namedCredentials.length; i++) {
                GerNamedUsernamePasswordCredentialType namedCredentialType = namedCredentials[i];
                NamedUsernamePasswordCredential namedCredential = new NamedUsernamePasswordCredential(namedCredentialType.getUsername().trim(), namedCredentialType.getPassword().trim().toCharArray(), namedCredentialType.getName().trim());
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerDefaultPrincipalType

        return security;
    }

    //used from app client builder
    public DefaultPrincipal buildDefaultPrincipal(XmlObject xmlObject) {
        GerDefaultPrincipalType defaultPrincipalType = (GerDefaultPrincipalType) xmlObject;
        DefaultPrincipal defaultPrincipal = new DefaultPrincipal();

        if(defaultPrincipalType.isSetPrincipal()) {
            defaultPrincipal.setPrincipal(buildPrincipal(defaultPrincipalType.getPrincipal()));
        } else if(defaultPrincipalType.isSetLoginDomainPrincipal()) {
            defaultPrincipal.setPrincipal(buildDomainPrincipal(defaultPrincipalType.getLoginDomainPrincipal()));
        } else if(defaultPrincipalType.isSetRealmPrincipal()) {
            defaultPrincipal.setPrincipal(buildRealmPrincipal(defaultPrincipalType.getRealmPrincipal()));
        } else {
            throw new IllegalStateException("default-principal does not contain a principal, login-domain-principal, or realm-principal");
        }
        GerNamedUsernamePasswordCredentialType[] namedCredentials = defaultPrincipalType.getNamedUsernamePasswordCredentialArray();
        if (namedCredentials.length > 0) {
            Set defaultCredentialSet = new HashSet();
            for (int i = 0; i < namedCredentials.length; i++) {
                GerNamedUsernamePasswordCredentialType namedCredentialType = namedCredentials[i];
                NamedUsernamePasswordCredential namedCredential = new NamedUsernamePasswordCredential(namedCredentialType.getUsername().trim(), namedCredentialType.getPassword().trim().toCharArray(), namedCredentialType.getName().trim());
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerDefaultPrincipalType

        tssConfig.setInherit(tss.getInherit());

        if (tss.isSetDefaultPrincipal()) {
            DefaultPrincipal defaultPrincipal = new DefaultPrincipal();
            GerDefaultPrincipalType defaultPrincipalType = tss.getDefaultPrincipal();

            defaultPrincipal.setPrincipal(new GeronimoSecurityBuilderImpl().buildPrincipal(defaultPrincipalType.getPrincipal()));

            tssConfig.setDefaultPrincipal(defaultPrincipal);
        }

        if (tss.isSetSSL()) {
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerDefaultPrincipalType

            security.setDoAsCurrentCaller(securityType.getDoasCurrentCaller());
            security.setUseContextHandler(securityType.getUseContextHandler());
            security.setDefaultRole(securityType.getDefaultRole());

            GerDefaultPrincipalType defaultPrincipalType = securityType.getDefaultPrincipal();
            DefaultPrincipal defaultPrincipal = new DefaultPrincipal();

            defaultPrincipal.setRealmName(defaultPrincipalType.getRealmName());
            defaultPrincipal.setPrincipal(buildPrincipal(defaultPrincipalType.getPrincipal()));

            security.setDefaultPrincipal(defaultPrincipal);

            GerRoleMappingsType roleMappingsType = securityType.getRoleMappings();
            if (roleMappingsType != null) {
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.