Search in sources :

Example 1 with NamedKeyInfoGeneratorManager

use of org.opensaml.xmlsec.keyinfo.NamedKeyInfoGeneratorManager in project pac4j by pac4j.

the class KeyStoreCredentialProvider method getKeyInfoGenerator.

@Override
public final KeyInfoGenerator getKeyInfoGenerator() {
    final NamedKeyInfoGeneratorManager mgmr = DefaultSecurityConfigurationBootstrap.buildBasicKeyInfoGeneratorManager();
    final Credential credential = getCredential();
    return mgmr.getDefaultManager().getFactory(credential).newInstance();
}
Also used : X509Credential(org.opensaml.security.x509.X509Credential) Credential(org.opensaml.security.credential.Credential) NamedKeyInfoGeneratorManager(org.opensaml.xmlsec.keyinfo.NamedKeyInfoGeneratorManager)

Example 2 with NamedKeyInfoGeneratorManager

use of org.opensaml.xmlsec.keyinfo.NamedKeyInfoGeneratorManager in project spring-security by spring-projects.

the class OpenSamlSigningUtils method buildSignatureKeyInfoGeneratorManager.

private static NamedKeyInfoGeneratorManager buildSignatureKeyInfoGeneratorManager() {
    final NamedKeyInfoGeneratorManager namedManager = new NamedKeyInfoGeneratorManager();
    namedManager.setUseDefaultManager(true);
    final KeyInfoGeneratorManager defaultManager = namedManager.getDefaultManager();
    // Generator for X509Credentials
    final X509KeyInfoGeneratorFactory x509Factory = new X509KeyInfoGeneratorFactory();
    x509Factory.setEmitEntityCertificate(true);
    x509Factory.setEmitEntityCertificateChain(true);
    defaultManager.registerFactory(x509Factory);
    return namedManager;
}
Also used : NamedKeyInfoGeneratorManager(org.opensaml.xmlsec.keyinfo.NamedKeyInfoGeneratorManager) KeyInfoGeneratorManager(org.opensaml.xmlsec.keyinfo.KeyInfoGeneratorManager) NamedKeyInfoGeneratorManager(org.opensaml.xmlsec.keyinfo.NamedKeyInfoGeneratorManager) X509KeyInfoGeneratorFactory(org.opensaml.xmlsec.keyinfo.impl.X509KeyInfoGeneratorFactory)

Example 3 with NamedKeyInfoGeneratorManager

use of org.opensaml.xmlsec.keyinfo.NamedKeyInfoGeneratorManager in project spring-security by spring-projects.

the class OpenSamlSigningUtils method buildSignatureKeyInfoGeneratorManager.

private static NamedKeyInfoGeneratorManager buildSignatureKeyInfoGeneratorManager() {
    final NamedKeyInfoGeneratorManager namedManager = new NamedKeyInfoGeneratorManager();
    namedManager.setUseDefaultManager(true);
    final KeyInfoGeneratorManager defaultManager = namedManager.getDefaultManager();
    // Generator for X509Credentials
    final X509KeyInfoGeneratorFactory x509Factory = new X509KeyInfoGeneratorFactory();
    x509Factory.setEmitEntityCertificate(true);
    x509Factory.setEmitEntityCertificateChain(true);
    defaultManager.registerFactory(x509Factory);
    return namedManager;
}
Also used : NamedKeyInfoGeneratorManager(org.opensaml.xmlsec.keyinfo.NamedKeyInfoGeneratorManager) KeyInfoGeneratorManager(org.opensaml.xmlsec.keyinfo.KeyInfoGeneratorManager) NamedKeyInfoGeneratorManager(org.opensaml.xmlsec.keyinfo.NamedKeyInfoGeneratorManager) X509KeyInfoGeneratorFactory(org.opensaml.xmlsec.keyinfo.impl.X509KeyInfoGeneratorFactory)

Example 4 with NamedKeyInfoGeneratorManager

use of org.opensaml.xmlsec.keyinfo.NamedKeyInfoGeneratorManager in project spring-security by spring-projects.

the class OpenSamlSigningUtils method buildSignatureKeyInfoGeneratorManager.

private static NamedKeyInfoGeneratorManager buildSignatureKeyInfoGeneratorManager() {
    final NamedKeyInfoGeneratorManager namedManager = new NamedKeyInfoGeneratorManager();
    namedManager.setUseDefaultManager(true);
    final KeyInfoGeneratorManager defaultManager = namedManager.getDefaultManager();
    // Generator for X509Credentials
    final X509KeyInfoGeneratorFactory x509Factory = new X509KeyInfoGeneratorFactory();
    x509Factory.setEmitEntityCertificate(true);
    x509Factory.setEmitEntityCertificateChain(true);
    defaultManager.registerFactory(x509Factory);
    return namedManager;
}
Also used : NamedKeyInfoGeneratorManager(org.opensaml.xmlsec.keyinfo.NamedKeyInfoGeneratorManager) KeyInfoGeneratorManager(org.opensaml.xmlsec.keyinfo.KeyInfoGeneratorManager) NamedKeyInfoGeneratorManager(org.opensaml.xmlsec.keyinfo.NamedKeyInfoGeneratorManager) X509KeyInfoGeneratorFactory(org.opensaml.xmlsec.keyinfo.impl.X509KeyInfoGeneratorFactory)

Aggregations

NamedKeyInfoGeneratorManager (org.opensaml.xmlsec.keyinfo.NamedKeyInfoGeneratorManager)4 KeyInfoGeneratorManager (org.opensaml.xmlsec.keyinfo.KeyInfoGeneratorManager)3 X509KeyInfoGeneratorFactory (org.opensaml.xmlsec.keyinfo.impl.X509KeyInfoGeneratorFactory)3 Credential (org.opensaml.security.credential.Credential)1 X509Credential (org.opensaml.security.x509.X509Credential)1