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


Java ClientAuth.REQUIRE属性代码示例

本文整理汇总了Java中io.netty.handler.ssl.ClientAuth.REQUIRE属性的典型用法代码示例。如果您正苦于以下问题:Java ClientAuth.REQUIRE属性的具体用法?Java ClientAuth.REQUIRE怎么用?Java ClientAuth.REQUIRE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在io.netty.handler.ssl.ClientAuth的用法示例。


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

示例1: usingNetty

static ClientHttpRequestFactory usingNetty(ClientOptions options)
		throws IOException, GeneralSecurityException {

	SslContext sslContext = new JdkSslContext(SSLContext.getDefault(), true, ClientAuth.REQUIRE);

	final Netty4ClientHttpRequestFactory requestFactory = new Netty4ClientHttpRequestFactory();
	requestFactory.setSslContext(sslContext);

	if (options.getConnectionTimeout() != null) {
		requestFactory.setConnectTimeout(options.getConnectionTimeout());
	}
	if (options.getReadTimeout() != null) {
		requestFactory.setReadTimeout(options.getReadTimeout());
	}

	return requestFactory;
}
 
开发者ID:spring-projects,项目名称:spring-credhub,代码行数:17,代码来源:ClientHttpRequestFactoryFactory.java

示例2: testNewInstanceLoader

@Test
public void testNewInstanceLoader() throws Exception {
    final SslContextReloader reloader = new SslContextReloader(() -> {
        return new JdkSslContext(SSLContext.getDefault(), true, ClientAuth.REQUIRE);
    });

    assertTrue(reloader.load());
    assertEquals(ReloadState.RELOADED, reloader.getReloadState());
    assertNull(reloader.getDataVersion());
}
 
开发者ID:indeedeng-alpha,项目名称:indeed-grpc-java,代码行数:10,代码来源:SslContextReloaderTest.java

示例3: testStaticInstanceLoader

@Test
public void testStaticInstanceLoader() throws Exception {
    final JdkSslContext context = new JdkSslContext(SSLContext.getDefault(), true, ClientAuth.REQUIRE);
    final SslContextReloader reloader = new SslContextReloader(() -> context);

    // don't invoke load here because the constructor forces load the first time
    assertEquals(ReloadState.RELOADED, reloader.getReloadState());
    assertNull(reloader.getDataVersion());

    assertFalse(reloader.load());
    assertEquals(ReloadState.NO_CHANGE, reloader.getReloadState());
    assertNull(reloader.getDataVersion());
}
 
开发者ID:indeedeng-alpha,项目名称:indeed-grpc-java,代码行数:13,代码来源:SslContextReloaderTest.java

示例4: isClientAuthConfigValid

@ValidationMethod(message = "must define keyManager when clientAuth is REQUIRE")
public boolean isClientAuthConfigValid() {
    return clientAuth != ClientAuth.REQUIRE || keyManager != null;
}
 
开发者ID:composable-systems,项目名称:dropwizard-cassandra,代码行数:4,代码来源:NettySSLOptionsFactory.java


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