congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
X509AuthHandler
Code IndexAdd Tabnine to your IDE (free)

How to use
X509AuthHandler
in
org.eclipse.hono.adapter.http

Best Java code snippets using org.eclipse.hono.adapter.http.X509AuthHandler (Showing top 3 results out of 315)

origin: org.eclipse.hono/hono-adapter-http-vertx-base

    .start();
getX509CertificatePath(path).compose(x509chain -> {
  span.log(detail);
  final Future<TenantObject> tenantTracker = getTenant(deviceCert, span);
  final List<X509Certificate> chainToValidate = Collections.singletonList(deviceCert);
  return tenantTracker
          return Future.failedFuture(e);
      }).compose(ok -> getCredentials(x509chain, tenantTracker.result()));
}).setHandler(verificationAttempt -> {
  if (verificationAttempt.succeeded()) {
origin: org.eclipse.hono/hono-adapter-http-vertx

@Override
protected void addRoutes(final Router router) {
  if (getConfig().isAuthenticationRequired()) {
    final ChainAuthHandler authHandler = new HonoChainAuthHandler();
    authHandler.append(new X509AuthHandler(
        Optional.ofNullable(clientCertAuthProvider).orElse(
            new X509AuthProvider(getCredentialsServiceClient(), getConfig())),
        getTenantServiceClient(),
        tracer));
    authHandler.append(new HonoBasicAuthHandler(
        Optional.ofNullable(usernamePasswordAuthProvider).orElse(
            new UsernamePasswordAuthProvider(getCredentialsServiceClient(), getConfig())),
        getConfig().getRealm()));
    addTelemetryApiRoutes(router, authHandler);
    addEventApiRoutes(router, authHandler);
    addCommandResponseRoutes(router, authHandler);
  } else {
    LOG.warn("device authentication has been disabled");
    LOG.warn("any device may publish data on behalf of all other devices");
    addTelemetryApiRoutes(router, null);
    addEventApiRoutes(router, null);
    addCommandResponseRoutes(router, null);
  }
}
origin: eclipse/hono

@Override
protected void addRoutes(final Router router) {
  if (getConfig().isAuthenticationRequired()) {
    final ChainAuthHandler authHandler = ChainAuthHandler.create();
    authHandler.append(new X509AuthHandler(
        new TenantServiceBasedX509Authentication(getTenantServiceClient(), tracer),
        Optional.ofNullable(clientCertAuthProvider).orElse(
            new X509AuthProvider(getCredentialsServiceClient(), getConfig(), tracer))));
    authHandler.append(new HonoBasicAuthHandler(
        Optional.ofNullable(usernamePasswordAuthProvider).orElse(
            new UsernamePasswordAuthProvider(getCredentialsServiceClient(), getConfig(), tracer)),
        getConfig().getRealm(), tracer));
    addTelemetryApiRoutes(router, authHandler);
    addEventApiRoutes(router, authHandler);
    addCommandResponseRoutes(router, authHandler);
  } else {
    LOG.warn("device authentication has been disabled");
    LOG.warn("any device may publish data on behalf of all other devices");
    addTelemetryApiRoutes(router, null);
    addEventApiRoutes(router, null);
    addCommandResponseRoutes(router, null);
  }
}
org.eclipse.hono.adapter.httpX509AuthHandler

Javadoc

A handler for authenticating HTTP clients using X.509 client certificates.

On successful validation of the certificate, the subject DN of the certificate is used to retrieve X.509 credentials for the device in order to determine the device identifier.

Most used methods

  • <init>
    Creates a new handler for an authentication provider and a Tenant service client.
  • getCredentials
    Gets the authentication information for a device's client certificate. This default implementation r
  • getTenant
  • getX509CertificatePath

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • getSupportFragmentManager (FragmentActivity)
  • onCreateOptionsMenu (Activity)
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • BoxLayout (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now