Package org.opensaml.xml.security.keyinfo

Examples of org.opensaml.xml.security.keyinfo.KeyInfoGeneratorManager


    protected static void populateKeyInfoGeneratorManager(BasicSecurityConfiguration config) {
        NamedKeyInfoGeneratorManager namedManager = new NamedKeyInfoGeneratorManager();
        config.setKeyInfoGeneratorManager(namedManager);
       
        namedManager.setUseDefaultManager(true);
        KeyInfoGeneratorManager defaultManager = namedManager.getDefaultManager();
       
        // Generator for basic Credentials
        BasicKeyInfoGeneratorFactory basicFactory = new BasicKeyInfoGeneratorFactory();
        basicFactory.setEmitPublicKeyValue(true);
       
        // Generator for X509Credentials
        X509KeyInfoGeneratorFactory x509Factory = new X509KeyInfoGeneratorFactory();
        x509Factory.setEmitEntityCertificate(true);
       
        defaultManager.registerFactory(basicFactory);
        defaultManager.registerFactory(x509Factory);
    }
View Full Code Here


    protected static void populateKeyInfoGeneratorManager(BasicSecurityConfiguration config) {
        NamedKeyInfoGeneratorManager namedManager = new NamedKeyInfoGeneratorManager();
        config.setKeyInfoGeneratorManager(namedManager);
       
        namedManager.setUseDefaultManager(true);
        KeyInfoGeneratorManager defaultManager = namedManager.getDefaultManager();
       
        // Generator for basic Credentials
        BasicKeyInfoGeneratorFactory basicFactory = new BasicKeyInfoGeneratorFactory();
        basicFactory.setEmitPublicKeyValue(true);
       
        // Generator for X509Credentials
        X509KeyInfoGeneratorFactory x509Factory = new X509KeyInfoGeneratorFactory();
        x509Factory.setEmitEntityCertificate(true);
       
        defaultManager.registerFactory(basicFactory);
        defaultManager.registerFactory(x509Factory);
    }
View Full Code Here

    protected static void populateKeyInfoGeneratorManager(BasicSecurityConfiguration config) {
        NamedKeyInfoGeneratorManager namedManager = new NamedKeyInfoGeneratorManager();
        config.setKeyInfoGeneratorManager(namedManager);
       
        namedManager.setUseDefaultManager(true);
        KeyInfoGeneratorManager defaultManager = namedManager.getDefaultManager();
       
        // Generator for basic Credentials
        BasicKeyInfoGeneratorFactory basicFactory = new BasicKeyInfoGeneratorFactory();
        basicFactory.setEmitPublicKeyValue(true);
       
        // Generator for X509Credentials
        X509KeyInfoGeneratorFactory x509Factory = new X509KeyInfoGeneratorFactory();
        x509Factory.setEmitEntityCertificate(true);
       
        defaultManager.registerFactory(basicFactory);
        defaultManager.registerFactory(x509Factory);
    }
View Full Code Here

        signature.setSigningCredential(credential);
        signature.setCanonicalizationAlgorithm(canonicalizationAlgorithm);

        if (includeKeyInfoInSignature) {
            logger.debug("Building KeyInfo");
            KeyInfoGeneratorManager keyInfoGeneratorManager = Configuration.getGlobalSecurityConfiguration().getKeyInfoGeneratorManager().getDefaultManager();
            KeyInfoGeneratorFactory keyInfoGeneratorFactory = keyInfoGeneratorManager.getFactory(credential);
            KeyInfo keyInfo = null;
            try {
                keyInfo = keyInfoGeneratorFactory.newInstance().generate(credential);
            } catch (SecurityException e) {
                throw new RuntimeException(e);
View Full Code Here

TOP

Related Classes of org.opensaml.xml.security.keyinfo.KeyInfoGeneratorManager

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.