Example usage for io.vertx.core.net NetServerOptions setClientAuth

List of usage examples for io.vertx.core.net NetServerOptions setClientAuth

Introduction

In this page you can find the example usage for io.vertx.core.net NetServerOptions setClientAuth.

Prototype

public NetServerOptions setClientAuth(ClientAuth clientAuth) 

Source Link

Document

Set whether client auth is required

Usage

From source file:io.servicecomb.foundation.vertx.VertxTLSBuilder.java

License:Apache License

public static NetServerOptions buildNetServerOptions(SSLOption sslOption, SSLCustom sslCustom,
        NetServerOptions netServerOptions) {
    buildTCPSSLOptions(sslOption, sslCustom, netServerOptions);
    if (sslOption.isAuthPeer()) {
        netServerOptions.setClientAuth(ClientAuth.REQUIRED);
    } else {//from   w  w  w  .ja v  a2 s  .com
        netServerOptions.setClientAuth(ClientAuth.REQUEST);
    }
    return netServerOptions;
}