Package org.apache.geronimo.corba.security.config.css

Examples of org.apache.geronimo.corba.security.config.css.CSSSASMechConfig


    protected static CSSASMechConfig extractGSSUPDynamic(CSSGSSUPDynamicType gssupType) {
        return new CSSGSSUPMechConfigDynamic(gssupType.getDomain());
    }

    protected static CSSSASMechConfig extractSASMech(CSSSasMechType sasMechType, Bundle bundle) throws DeploymentException {
        CSSSASMechConfig result = new CSSSASMechConfig();

        if (sasMechType == null) {
            result.setIdentityToken(new CSSSASITTAbsent());
        } else if (sasMechType.isSetITTAbsent()) {
            result.setIdentityToken(new CSSSASITTAbsent());
        } else if (sasMechType.isSetITTAnonymous()) {
            result.setIdentityToken(new CSSSASITTAnonymous());
        } else if (sasMechType.isSetITTPrincipalNameStatic()) {
            CSSITTPrincipalNameStaticType principal = sasMechType.getITTPrincipalNameStatic();
            result.setIdentityToken(new CSSSASITTPrincipalNameStatic(principal.getOid(), principal.getName()));
        } else if (sasMechType.isSetITTPrincipalNameDynamic()) {
            CSSITTPrincipalNameDynamicType principal = sasMechType.getITTPrincipalNameDynamic();
            String principalClassName = principal.getPrincipalClass();
            Class principalClass = null;
            try {
                principalClass = ClassLoading.loadClass(principalClassName, bundle);
            } catch (ClassNotFoundException e) {
                throw new DeploymentException("Could not load principal class", e);
            }
            String domainName = principal.getDomain();
            String realmName = null;
            if (domainName != null) {
                realmName = principal.getRealm();
            }
            result.setIdentityToken(new CSSSASITTPrincipalNameDynamic(principal.getOid(), principalClass, domainName, realmName));
        }

        return result;
    }
View Full Code Here


    protected static CSSASMechConfig extractGSSUPDynamic(CSSGSSUPDynamicType gssupType) {
        return new CSSGSSUPMechConfigDynamic(gssupType.getDomain());
    }

    protected static CSSSASMechConfig extractSASMech(CSSSasMechType sasMechType, Bundle bundle) throws DeploymentException {
        CSSSASMechConfig result = new CSSSASMechConfig();

        if (sasMechType == null) {
            result.setIdentityToken(new CSSSASITTAbsent());
        } else if (sasMechType.isSetITTAbsent()) {
            result.setIdentityToken(new CSSSASITTAbsent());
        } else if (sasMechType.isSetITTAnonymous()) {
            result.setIdentityToken(new CSSSASITTAnonymous());
        } else if (sasMechType.isSetITTPrincipalNameStatic()) {
            CSSITTPrincipalNameStaticType principal = sasMechType.getITTPrincipalNameStatic();
            result.setIdentityToken(new CSSSASITTPrincipalNameStatic(principal.getOid(), principal.getName()));
        } else if (sasMechType.isSetITTPrincipalNameDynamic()) {
            CSSITTPrincipalNameDynamicType principal = sasMechType.getITTPrincipalNameDynamic();
            String principalClassName = principal.getPrincipalClass();
            Class principalClass = null;
            try {
                principalClass = ClassLoading.loadClass(principalClassName, bundle);
            } catch (ClassNotFoundException e) {
                throw new DeploymentException("Could not load principal class", e);
            }
            String domainName = principal.getDomain();
            String realmName = null;
            if (domainName != null) {
                realmName = principal.getRealm();
            }
            result.setIdentityToken(new CSSSASITTPrincipalNameDynamic(principal.getOid(), principalClass, domainName, realmName));
        }

        return result;
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.corba.security.config.css.CSSSASMechConfig

Copyright © 2018 www.massapicom. 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.