当前位置: 首页>>代码示例>>Java>>正文


Java X509CertificateFactory类代码示例

本文整理汇总了Java中uk.gov.ida.common.shared.security.X509CertificateFactory的典型用法代码示例。如果您正苦于以下问题:Java X509CertificateFactory类的具体用法?Java X509CertificateFactory怎么用?Java X509CertificateFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


X509CertificateFactory类属于uk.gov.ida.common.shared.security包,在下文中一共展示了X509CertificateFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configure

import uk.gov.ida.common.shared.security.X509CertificateFactory; //导入依赖的package包/类
@Override
protected void configure() {
    bind(EncryptionKeyStore.class).to(HubEncryptionKeyStore.class).asEagerSingleton();
    bind(SigningKeyStore.class).annotatedWith(Names.named("authnRequestKeyStore")).to(AuthnRequestKeyStore.class).asEagerSingleton();
    bind(SigningKeyStore.class).annotatedWith(Names.named("samlResponseFromMatchingServiceKeyStore")).to(SamlResponseFromMatchingServiceKeyStore.class).asEagerSingleton();
    bind(X509CertificateFactory.class).toInstance(new X509CertificateFactory());
    bind(CertificateChainValidator.class);
    bind(PKIXParametersProvider.class).toInstance(new PKIXParametersProvider());
    bind(CertificatesConfigProxy.class);
    bind(TrustStoreForCertificateProvider.class);
    bind(EncryptionCredentialFactory.class);
    bind(KeyStoreCache.class);
    bind(KeyStoreLoader.class).toInstance(new KeyStoreLoader());
    bind(SignatureFactory.class);
    bind(IdaKeyStoreCredentialRetriever.class);
    bind(SamlResponseAssertionEncrypter.class);
    bind(AssertionBlobEncrypter.class);
    bind(EncrypterFactory.class).toInstance(new EncrypterFactory());
    bind(SignatureAlgorithm.class).toInstance(new SignatureRSASHA1());
    bind(DigestAlgorithm.class).toInstance(new DigestSHA256());
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:22,代码来源:CryptoModule.java

示例2: getAttributeQueryToElementTransformer

import uk.gov.ida.common.shared.security.X509CertificateFactory; //导入依赖的package包/类
public static AttributeQueryToElementTransformer getAttributeQueryToElementTransformer(SignatureAlgorithm signatureAlgorithm, DigestAlgorithm digestAlgorithm, String hubEntityId) {
    PublicKeyFactory publicKeyFactory = new PublicKeyFactory(new X509CertificateFactory());
    PrivateKey privateKey = new PrivateKeyFactory().createPrivateKey(Base64.decodeBase64(TestCertificateStrings.PRIVATE_SIGNING_KEYS.get(TestEntityIds.HUB_ENTITY_ID)));
    PublicKey publicKey = publicKeyFactory.createPublicKey(TestCertificateStrings.getPrimaryPublicEncryptionCert(TestEntityIds.HUB_ENTITY_ID));

    PrivateKey privateEncryptionKey = new PrivateKeyFactory().createPrivateKey(Base64.decodeBase64(TestCertificateStrings.HUB_TEST_PRIVATE_ENCRYPTION_KEY));
    PublicKey publicEncryptionKey = publicKeyFactory.createPublicKey(TestCertificateStrings.HUB_TEST_PUBLIC_ENCRYPTION_CERT);

    KeyPair encryptionKeyPair = new KeyPair(publicEncryptionKey, privateEncryptionKey);

    KeyPair signingKeyPair = new KeyPair(publicKey, privateKey);
    IdaKeyStore keyStore = new IdaKeyStore(signingKeyPair, Collections.singletonList(encryptionKeyPair));

    IdaKeyStoreCredentialRetriever privateCredentialFactory = new IdaKeyStoreCredentialRetriever(keyStore);
    return new AttributeQueryToElementTransformer(
            new SigningRequestAbstractTypeSignatureCreator<>(new SignatureFactory(privateCredentialFactory, signatureAlgorithm, digestAlgorithm)),
            new SamlAttributeQueryAssertionSignatureSigner(privateCredentialFactory, new OpenSamlXmlObjectFactory(), hubEntityId),
            new SamlSignatureSigner<>(),
            new XmlObjectToElementTransformer<>(),
            new SamlAttributeQueryAssertionEncrypter(new EncryptionCredentialFactory(new HardCodedKeyStore(hubEntityId)), new EncrypterFactory(), requestId -> TEST_RP_MS)
    );
}
 
开发者ID:alphagov,项目名称:verify-matching-service-adapter,代码行数:23,代码来源:RequestHelper.java

示例3: setup

import uk.gov.ida.common.shared.security.X509CertificateFactory; //导入依赖的package包/类
@Before
public void setup() throws Exception {
    PublicKeyFactory publicKeyFactory = new PublicKeyFactory(new X509CertificateFactory());
    PrivateKey privateKey = new PrivateKeyFactory().createPrivateKey(Base64.decodeBase64(TestCertificateStrings.PRIVATE_SIGNING_KEYS.get(HUB_ENTITY_ID)));
    PublicKey publicKey = publicKeyFactory.createPublicKey(TestCertificateStrings.getPrimaryPublicEncryptionCert(HUB_ENTITY_ID));

    PrivateKey privateEncryptionKey = new PrivateKeyFactory().createPrivateKey(Base64.decodeBase64(TestCertificateStrings.HUB_TEST_PRIVATE_ENCRYPTION_KEY));
    PublicKey publicEncryptionKey = publicKeyFactory.createPublicKey(TestCertificateStrings.HUB_TEST_PUBLIC_ENCRYPTION_CERT);

    KeyPair encryptionKeyPair = new KeyPair(publicEncryptionKey, privateEncryptionKey);

    KeyPair signingKeyPair = new KeyPair(publicKey, privateKey);
    IdaKeyStore keyStore = new IdaKeyStore(signingKeyPair, Collections.singletonList(encryptionKeyPair));

    assertionDecrypter = new AssertionDecrypter(new IdaKeyStoreCredentialRetriever(
            keyStore),
            new EncryptionAlgorithmValidator(),
            new DecrypterFactory());
    setUpMatchingService();
}
 
开发者ID:alphagov,项目名称:verify-matching-service-adapter,代码行数:21,代码来源:UserAccountCreationAppRuleTest.java

示例4: createResponse_shouldReturnValidSamlResponse

import uk.gov.ida.common.shared.security.X509CertificateFactory; //导入依赖的package包/类
@Test
public void createResponse_shouldReturnValidSamlResponse() throws Exception {
    PublicKeyFactory publicKeyFactory = new PublicKeyFactory(new X509CertificateFactory());
    PrivateKey privateKey = new PrivateKeyFactory().createPrivateKey(Base64.decodeBase64(TestCertificateStrings.PRIVATE_SIGNING_KEYS.get(TestEntityIds.STUB_IDP_ONE)));
    PublicKey publicKey = publicKeyFactory.createPublicKey(TestCertificateStrings.getPrimaryPublicEncryptionCert(TestEntityIds.HUB_ENTITY_ID));

    PrivateKey privateEncryptionKey = new PrivateKeyFactory().createPrivateKey(Base64.decodeBase64(TestCertificateStrings.HUB_TEST_PRIVATE_ENCRYPTION_KEY));
    PublicKey publicEncryptionKey = publicKeyFactory.createPublicKey(TestCertificateStrings.HUB_TEST_PUBLIC_ENCRYPTION_CERT);

    KeyPair encryptionKeyPair = new KeyPair(publicEncryptionKey, privateEncryptionKey);

    KeyPair signingKeyPair = new KeyPair(publicKey, privateKey);
    IdaKeyStore keyStore = new IdaKeyStore(signingKeyPair, Arrays.asList(encryptionKeyPair));
    ExceptionResponseFactory exceptionResponseFactory = new ExceptionResponseFactory(new OpenSamlXmlObjectFactory(), new IdaKeyStoreCredentialRetriever(keyStore), new IdGenerator());

    String errorMessage = "some message";
    String requestId = UUID.randomUUID().toString();
    Element element = exceptionResponseFactory.createResponse(requestId, TEST_ENTITY_ID, errorMessage);

    Response attributeQueryResponse = (Response) XMLObjectProviderRegistrySupport.getUnmarshallerFactory().getUnmarshaller(element).unmarshall(element);

    assertThat(attributeQueryResponse.getStatus().getStatusCode().getValue()).isEqualTo(StatusCode.REQUESTER);
    assertThat(attributeQueryResponse.getStatus().getStatusMessage().getMessage()).isEqualTo(errorMessage);
    assertThat(attributeQueryResponse.getInResponseTo()).isEqualTo(requestId);
    assertThat(attributeQueryResponse.getIssuer().getValue()).isEqualTo(TEST_ENTITY_ID);
}
 
开发者ID:alphagov,项目名称:verify-matching-service-adapter,代码行数:27,代码来源:ExceptionResponseFactoryTest.java

示例5: configure

import uk.gov.ida.common.shared.security.X509CertificateFactory; //导入依赖的package包/类
@Override
protected void configure() {
    bind(TrustStoreConfiguration.class).to(SamlProxyConfiguration.class);
    bind(RestfulClientConfiguration.class).to(SamlProxyConfiguration.class);
    bind(PublicKeyInputStreamFactory.class).toInstance(new PublicKeyFileInputStreamFactory());
    bind(SigningKeyStore.class).to(AuthnRequestKeyStore.class);
    bind(Client.class).toProvider(DefaultClientProvider.class).in(Scopes.SINGLETON);
    bind(EventSinkProxy.class).to(EventSinkHttpProxy.class);
    bind(KeyStore.class).toProvider(KeyStoreProvider.class).in(Scopes.SINGLETON);
    bind(ConfigServiceKeyStore.class).asEagerSingleton();
    bind(KeyStoreLoader.class).toInstance(new KeyStoreLoader());
    bind(ResponseMaxSizeValidator.class);
    bind(ExpiredCertificateMetadataFilter.class).toInstance(new ExpiredCertificateMetadataFilter());
    bind(X509CertificateFactory.class).toInstance(new X509CertificateFactory());
    bind(CertificateChainValidator.class);
    bind(CertificatesConfigProxy.class);
    bind(TrustStoreForCertificateProvider.class);
    bind(StringSizeValidator.class).toInstance(new StringSizeValidator());
    bind(JsonResponseProcessor.class);
    bind(ObjectMapper.class).toInstance(new ObjectMapper());
    bind(PKIXParametersProvider.class).toInstance(new PKIXParametersProvider());
    bind(RelayStateValidator.class).toInstance(new RelayStateValidator());
    bind(ProtectiveMonitoringLogFormatter.class).toInstance(new ProtectiveMonitoringLogFormatter());
    bind(KeyStoreCache.class);
    bind(EventSinkMessageSender.class);
    bind(ExceptionAuditor.class);
    bind(ProtectiveMonitoringLogger.class);
    bind(SessionProxy.class);
    bind(new TypeLiteral<LevelLoggerFactory<SamlProxySamlTransformationErrorExceptionMapper>>(){}).toInstance(new LevelLoggerFactory<>());
    bind(new TypeLiteral<LevelLoggerFactory<NoKeyConfiguredForEntityExceptionMapper>>(){}).toInstance(new LevelLoggerFactory<>());
    bind(new TypeLiteral<LevelLoggerFactory<SamlProxyApplicationExceptionMapper>>(){}).toInstance(new LevelLoggerFactory<>());
    bind(new TypeLiteral<LevelLoggerFactory<SamlProxyExceptionMapper>>(){}).toInstance(new LevelLoggerFactory<>());
    bind(SamlMessageSenderHandler.class);
    bind(ExternalCommunicationEventLogger.class);
    bind(IpAddressResolver.class).toInstance(new IpAddressResolver());
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:37,代码来源:SamlProxyModule.java

示例6: ConfigServiceKeyStore

import uk.gov.ida.common.shared.security.X509CertificateFactory; //导入依赖的package包/类
@Inject
public ConfigServiceKeyStore(
        CertificatesConfigProxy certificatesConfigProxy,
        CertificateChainValidator certificateChainValidator,
        TrustStoreForCertificateProvider trustStoreForCertificateProvider,
        X509CertificateFactory x509CertificateFactory) {

    this.certificatesConfigProxy = certificatesConfigProxy;
    this.certificateChainValidator = certificateChainValidator;
    this.trustStoreForCertificateProvider = trustStoreForCertificateProvider;
    this.x509CertificateFactory = x509CertificateFactory;
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:13,代码来源:ConfigServiceKeyStore.java

示例7: getKeyStore

import uk.gov.ida.common.shared.security.X509CertificateFactory; //导入依赖的package包/类
private static IdaKeyStore getKeyStore() throws Base64DecodingException {
    List<KeyPair> encryptionKeyPairs = new ArrayList<>();
    PublicKeyFactory publicKeyFactory = new PublicKeyFactory(new X509CertificateFactory());
    PrivateKeyFactory privateKeyFactory = new PrivateKeyFactory();
    PublicKey encryptionPublicKey = publicKeyFactory.createPublicKey(HUB_TEST_PUBLIC_ENCRYPTION_CERT);
    PrivateKey encryptionPrivateKey = privateKeyFactory.createPrivateKey(Base64.getDecoder().decode(HUB_TEST_PRIVATE_ENCRYPTION_KEY.getBytes()));
    encryptionKeyPairs.add(new KeyPair(encryptionPublicKey, encryptionPrivateKey));
    PublicKey publicSigningKey = publicKeyFactory.createPublicKey(HUB_TEST_PUBLIC_SIGNING_CERT);
    PrivateKey privateSigningKey = privateKeyFactory.createPrivateKey(Base64.getDecoder().decode(HUB_TEST_PRIVATE_SIGNING_KEY.getBytes()));
    KeyPair signingKeyPair = new KeyPair(publicSigningKey, privateSigningKey);

    return new IdaKeyStore(signingKeyPair, encryptionKeyPairs);
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:14,代码来源:SamlMessageSenderApiResourceTest.java

示例8: getKeyStore

import uk.gov.ida.common.shared.security.X509CertificateFactory; //导入依赖的package包/类
@Provides
@Singleton
private IdaKeyStore getKeyStore(X509CertificateFactory certificateFactory, SamlEngineConfiguration configuration) {
    Map<KeyPosition, PrivateKey> privateKeyStore = privateEncryptionKeys(configuration);

    DeserializablePublicKeyConfiguration publicSigningKeyConfiguration = configuration.getPublicSigningCert();
    String encodedSigningCertificate = publicSigningKeyConfiguration.getCert();
    X509Certificate signingCertificate = encodedSigningCertificate != null ? certificateFactory.createCertificate(encodedSigningCertificate) : null;

    KeyPair primaryEncryptionKeyPair = Crypto.keyPairFromPrivateKey(privateKeyStore.get(KeyPosition.PRIMARY));
    KeyPair secondaryEncryptionKeyPair = Crypto.keyPairFromPrivateKey(privateKeyStore.get(KeyPosition.SECONDARY));
    KeyPair signingKeyPair = Crypto.keyPairFromPrivateKey(privateSigningKey(configuration));

    return new IdaKeyStore(signingCertificate, signingKeyPair, asList(primaryEncryptionKeyPair, secondaryEncryptionKeyPair));
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:16,代码来源:SamlEngineModule.java

示例9: aValidMatchResponseFromMatchingService

import uk.gov.ida.common.shared.security.X509CertificateFactory; //导入依赖的package包/类
private String aValidMatchResponseFromMatchingService(final String requestId, final Status status, DateTime notOnOrAfter) throws MarshallingException, SignatureException {
    Credential signingCredential = new TestCredentialFactory(TEST_RP_MS_PUBLIC_SIGNING_CERT, TEST_RP_MS_PRIVATE_SIGNING_KEY).getSigningCredential();
    return XmlUtils.writeToString(aResponse()
            .withStatus(status)
            .withInResponseTo(requestId)
            .withIssuer(anIssuer().withIssuerId(TEST_RP_MS).build())
            .withSigningCredential(signingCredential)
            .addEncryptedAssertion(
                    anAssertion()
                            .withSubject(
                                    aSubject()
                                            .withSubjectConfirmation(
                                                    aSubjectConfirmation()
                                                            .withSubjectConfirmationData(
                                                                    aSubjectConfirmationData()
                                                                            .withInResponseTo(requestId)
                                                                            .withNotOnOrAfter(
                                                                                    notOnOrAfter
                                                                            )
                                                                            .build()
                                                            )
                                                            .build()
                                            )
                                            .build()
                            )
                            .withIssuer(anIssuer().withIssuerId(TEST_RP_MS).build())
                            .withSignature(aSignature().withSigningCredential(signingCredential).build())
                            .addAuthnStatement(anAuthnStatement().build())
                            .buildWithEncrypterCredential(new EncryptionCredentialFactory(entityId -> {
                                PublicKeyFactory keyFactory = new PublicKeyFactory(new X509CertificateFactory());
                                return keyFactory.createPublicKey(HUB_TEST_PUBLIC_ENCRYPTION_CERT);
                            }).getEncryptingCredential(HUB_ENTITY_ID))
            ).build().getDOM());
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:35,代码来源:MatchingServiceHealthcheckResponseTranslatorResourceTest.java

示例10: aValidMatchResponseFromMatchingService

import uk.gov.ida.common.shared.security.X509CertificateFactory; //导入依赖的package包/类
private String aValidMatchResponseFromMatchingService(final String requestId, final Status status, DateTime notOnOrAfter) throws MarshallingException, SignatureException {
    return XmlUtils.writeToString(aResponse()
            .withStatus(status)
            .withInResponseTo(requestId)
            .withIssuer(anIssuer().withIssuerId(TEST_RP_MS).build())
            .withSigningCredential(msaSigningCredential)
            .addEncryptedAssertion(
                    anAssertion()
                            .withSubject(
                                    aSubject()
                                            .withSubjectConfirmation(
                                                    aSubjectConfirmation()
                                                            .withSubjectConfirmationData(
                                                                    aSubjectConfirmationData()
                                                                            .withInResponseTo(requestId)
                                                                            .withNotOnOrAfter(
                                                                                    notOnOrAfter
                                                                            )
                                                                            .build()
                                                            )
                                                            .build()
                                            )
                                            .build()
                            )
                            .withIssuer(anIssuer().withIssuerId(TEST_RP_MS).build())
                            .withSignature(
                                    aSignature().withSigningCredential(msaSigningCredential).build()
                            )
                            .addAuthnStatement(anAuthnStatement().build())
                            .buildWithEncrypterCredential(new EncryptionCredentialFactory(entityId -> {
                                PublicKeyFactory keyFactory = new PublicKeyFactory(new X509CertificateFactory());
                                return keyFactory.createPublicKey(HUB_TEST_PUBLIC_ENCRYPTION_CERT);
                            }).getEncryptingCredential(HUB_ENTITY_ID))
            ).build().getDOM());
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:36,代码来源:MatchingServiceResponseTranslatorResourceTest.java

示例11: aValidMatchResponseFromMatchingServiceWithMissingData

import uk.gov.ida.common.shared.security.X509CertificateFactory; //导入依赖的package包/类
private String aValidMatchResponseFromMatchingServiceWithMissingData(final String requestId, final Status status, String msaEntityId) throws MarshallingException, SignatureException {
    return XmlUtils.writeToString(aResponse()
            .withStatus(status)
            .withInResponseTo(requestId)
            .withIssuer(anIssuer().withIssuerId(msaEntityId).build())
            .withSigningCredential(msaSigningCredential)
            .addEncryptedAssertion(
                    anAssertion()
                            .withSubject(
                                    aSubject()
                                            .withSubjectConfirmation(
                                                    aSubjectConfirmation()
                                                            .withSubjectConfirmationData(
                                                                    aSubjectConfirmationData()
                                                                            .withInResponseTo(requestId)
                                                                            .withNotOnOrAfter(
                                                                                    DateTime.now()
                                                                                            .plusDays(5)
                                                                            )
                                                                            .build()
                                                            )
                                                            .build()
                                            )
                                            .build()
                            )
                            .withIssuer(anIssuer().withIssuerId(msaEntityId).build())
                            .withSignature(
                                    aSignature().withSigningCredential(msaSigningCredential).build()
                            )
                            .buildWithEncrypterCredential(new EncryptionCredentialFactory(entityId -> {
                                PublicKeyFactory keyFactory = new PublicKeyFactory(new X509CertificateFactory());
                                return keyFactory.createPublicKey(HUB_TEST_PUBLIC_ENCRYPTION_CERT);
                            }).getEncryptingCredential(HUB_ENTITY_ID))
            ).build().getDOM());
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:36,代码来源:MatchingServiceResponseTranslatorResourceTest.java

示例12: getKeyStore

import uk.gov.ida.common.shared.security.X509CertificateFactory; //导入依赖的package包/类
private IdaKeyStore getKeyStore() throws Base64DecodingException {
    List<KeyPair> encryptionKeyPairs = new ArrayList<>();
    PublicKeyFactory publicKeyFactory = new PublicKeyFactory(new X509CertificateFactory());
    PrivateKeyFactory privateKeyFactory = new PrivateKeyFactory();
    PublicKey encryptionPublicKey = publicKeyFactory.createPublicKey(HUB_TEST_PUBLIC_ENCRYPTION_CERT);
    PrivateKey encryptionPrivateKey = privateKeyFactory.createPrivateKey(Base64.getDecoder().decode(HUB_TEST_PRIVATE_ENCRYPTION_KEY.getBytes()));
    encryptionKeyPairs.add(new KeyPair(encryptionPublicKey, encryptionPrivateKey));
    PublicKey publicSigningKey = publicKeyFactory.createPublicKey(HUB_TEST_PUBLIC_SIGNING_CERT);
    PrivateKey privateSigningKey = privateKeyFactory.createPrivateKey(Base64.getDecoder().decode(HUB_TEST_PRIVATE_SIGNING_KEY.getBytes()));
    KeyPair signingKeyPair = new KeyPair(publicSigningKey, privateSigningKey);

    return new IdaKeyStore(signingKeyPair, encryptionKeyPairs);
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:14,代码来源:MatchingServiceHealthCheckIntegrationTests.java

示例13: run_shouldThrowCertChainValidationExceptionOnResponse

import uk.gov.ida.common.shared.security.X509CertificateFactory; //导入依赖的package包/类
@Test
public void run_shouldThrowCertChainValidationExceptionOnResponse() throws Exception {
    when(attributeQueryRequestClient.sendQuery(any(Element.class), anyString(), any(SessionId.class), any(URI.class))).thenReturn(matchingServiceResponse);
    final BasicX509Credential x509Credential = new BasicX509Credential(
            new X509CertificateFactory().createCertificate(UNCHAINED_PUBLIC_CERT),
            new PrivateKeyFactory().createPrivateKey(Base64.decode(UNCHAINED_PRIVATE_KEY.getBytes())));
    Response response = aResponse().withSigningCredential(x509Credential).withIssuer(anIssuer().withIssuerId("issuer-id").build()).build();
    when(elementToResponseTransformer.apply(matchingServiceResponse)).thenReturn(response);
    executeAttributeQueryRequest.execute(sessionId, attributeQueryContainerDto);

    verify(matchingResponseSignatureValidator).validate(response, AttributeAuthorityDescriptor.DEFAULT_ELEMENT_NAME);
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:13,代码来源:ExecuteAttributeQueryRequestTest.java

示例14: configure

import uk.gov.ida.common.shared.security.X509CertificateFactory; //导入依赖的package包/类
@Override
protected void configure() {
    bind(ConfigHealthCheck.class).asEagerSingleton();
    bind(ConfigDataBootstrap.class).asEagerSingleton();
    bind(TrustStoreConfiguration.class).to(ConfigConfiguration.class);
    bind(new TypeLiteral<ConfigurationFactoryFactory<IdentityProviderConfigEntityData>>() {}).toInstance(new DefaultConfigurationFactoryFactory<IdentityProviderConfigEntityData>());
    bind(new TypeLiteral<ConfigurationFactoryFactory<TransactionConfigEntityData>>(){}).toInstance(new DefaultConfigurationFactoryFactory<TransactionConfigEntityData>());
    bind(new TypeLiteral<ConfigurationFactoryFactory<MatchingServiceConfigEntityData>>(){}).toInstance(new DefaultConfigurationFactoryFactory<MatchingServiceConfigEntityData>());
    bind(new TypeLiteral<ConfigurationFactoryFactory<CountriesConfigEntityData>>(){}).toInstance(new DefaultConfigurationFactoryFactory<CountriesConfigEntityData>());
    bind(new TypeLiteral<ConfigDataSource<TransactionConfigEntityData>>() {}).to(FileBackedTransactionConfigDataSource.class).asEagerSingleton();
    bind(new TypeLiteral<ConfigDataSource<MatchingServiceConfigEntityData>>() {}).to(FileBackedMatchingServiceConfigDataSource.class).asEagerSingleton();
    bind(new TypeLiteral<ConfigDataSource<IdentityProviderConfigEntityData>>() {}).to(FileBackedIdentityProviderConfigDataSource.class).asEagerSingleton();
    bind(new TypeLiteral<ConfigDataSource<CountriesConfigEntityData>>() {}).to(FileBackedCountriesConfigDataSource.class).asEagerSingleton();
    bind(new TypeLiteral<ConfigEntityDataRepository<TransactionConfigEntityData>>(){}).asEagerSingleton();
    bind(new TypeLiteral<ConfigEntityDataRepository<CountriesConfigEntityData>>(){}).asEagerSingleton();
    bind(new TypeLiteral<ConfigEntityDataRepository<MatchingServiceConfigEntityData>>(){}).asEagerSingleton();
    bind(new TypeLiteral<ConfigEntityDataRepository<IdentityProviderConfigEntityData>>(){}).asEagerSingleton();
    bind(ObjectMapper.class).toInstance(new ObjectMapper().registerModule(new GuavaModule()));
    bind(LevelsOfAssuranceConfigValidator.class).toInstance(new LevelsOfAssuranceConfigValidator());
    bind(CertificateChainConfigValidator.class);
    bind(CertificateChainValidator.class);
    bind(TrustStoreForCertificateProvider.class);
    bind(X509CertificateFactory.class).toInstance(new X509CertificateFactory());
    bind(KeyStoreCache.class);
    bind(ExceptionFactory.class);
    bind(OCSPCertificateChainValidityChecker.class);
    bind(EntityConfigDataToCertificateDtoTransformer.class);
    bind(OCSPCertificateChainValidator.class);
    bind(IdpPredicateFactory.class);
    bind(KeyStoreLoader.class).toInstance(new KeyStoreLoader());
    bind(OCSPPKIXParametersProvider.class).toInstance(new OCSPPKIXParametersProvider());
    bind(PKIXParametersProvider.class).toInstance(new PKIXParametersProvider());
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:34,代码来源:ConfigModule.java

示例15: configure

import uk.gov.ida.common.shared.security.X509CertificateFactory; //导入依赖的package包/类
@Override
protected void configure() {

    bind(PKIXParametersProvider.class).toInstance(new PKIXParametersProvider());
    bind(SoapMessageManager.class).toInstance(new SoapMessageManager());
    bind(X509CertificateFactory.class);
    bind(KeyStoreLoader.class);
    bind(IdGenerator.class);
    bind(IdaKeyStoreCredentialRetriever.class);
    bind(ExpiredCertificateMetadataFilter.class);
    bind(ExceptionResponseFactory.class);
    bind(InboundMatchingServiceRequestToMatchingServiceRequestDtoMapper.class);
    bind(MatchingServiceResponseDtoToOutboundResponseFromMatchingServiceMapper.class);
    bind(MatchingServiceAdapterMetadataRepository.class);
    bind(DocumentToInboundMatchingServiceRequestMapper.class);
    bind(IdGenerator.class);
    bind(MatchingServiceAssertionFactory.class);
    bind(UserAccountCreationAttributeExtractor.class);
    bind(UnknownUserAttributeQueryHandler.class);

    bind(SigningKeyStore.class).to(MetadataPublicKeyStore.class).in(Singleton.class);
    bind(EncryptionKeyStore.class).to(MetadataPublicKeyStore.class).in(Singleton.class);
    bind(PublicKeyInputStreamFactory.class).to(PublicKeyFileInputStreamFactory.class).in(Singleton.class);
    bind(AssertionLifetimeConfiguration.class).to(MatchingServiceAdapterConfiguration.class).in(Singleton.class);
    bind(MatchingServiceProxy.class).to(MatchingServiceProxyImpl.class).in(Singleton.class);
    bind(ManifestReader.class).toInstance(new ManifestReader());
    bind(MatchingDatasetToMatchingDatasetDtoMapper.class).toInstance(new MatchingDatasetToMatchingDatasetDtoMapper());
}
 
开发者ID:alphagov,项目名称:verify-matching-service-adapter,代码行数:29,代码来源:MatchingServiceAdapterModule.java


注:本文中的uk.gov.ida.common.shared.security.X509CertificateFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。