congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
HonoClientBasedAuthProvider.authenticate
Code IndexAdd Tabnine to your IDE (free)

How to use
authenticate
method
in
org.eclipse.hono.service.auth.device.HonoClientBasedAuthProvider

Best Java code snippets using org.eclipse.hono.service.auth.device.HonoClientBasedAuthProvider.authenticate (Showing top 3 results out of 315)

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

private Future<DeviceUser> authenticate(final DeviceCredentials credentials, final Span currentSpan) {
  final Future<DeviceUser> result = Future.future();
  usernamePasswordAuthProvider.authenticate(credentials, handler -> {
    if (handler.succeeded()) {
      final DeviceUser authenticatedDevice = handler.result();
      currentSpan.log("device authenticated");
      LOG.debug("successfully authenticated device [tenant-id: {}, auth-id: {}, device-id: {}]",
          authenticatedDevice.getTenantId(), credentials.getAuthId(),
          authenticatedDevice.getDeviceId());
      result.complete(authenticatedDevice);
    } else {
      LOG.debug("Failed to authenticate device [tenant-id: {}, auth-id: {}] ",
          credentials.getTenantId(), credentials.getAuthId(), handler.cause());
      result.fail(handler.cause());
    }
  });
  return result;
}
origin: eclipse/hono

  final String tenantId = tenantTracker.result().getTenantId();
  final SubjectDnCredentials credentials = SubjectDnCredentials.create(tenantId, deviceCert.getSubjectX500Principal());
  getCertificateAuthProvider().authenticate(credentials, currentSpan.context(), completer);
  return null;
}).otherwise(t -> {
origin: eclipse/hono

  getUsernamePasswordAuthProvider().authenticate(credentials, currentSpan.context(), completer);
} else {
  completer.handle(Future.failedFuture(new CredentialException(
org.eclipse.hono.service.auth.deviceHonoClientBasedAuthProviderauthenticate

Javadoc

Validates credentials provided by a device against the credentials on record for the device.

The credentials on record are retrieved using Hono's Credentials API.

Popular methods of HonoClientBasedAuthProvider

    Popular in Java

    • Parsing JSON documents to java classes using gson
    • orElseThrow (Optional)
      Return the contained value, if present, otherwise throw an exception to be created by the provided s
    • getApplicationContext (Context)
    • onRequestPermissionsResult (Fragment)
    • DecimalFormat (java.text)
      A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
    • Stream (java.util.stream)
      A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
    • HttpServlet (javax.servlet.http)
      Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
    • JCheckBox (javax.swing)
    • JPanel (javax.swing)
    • BasicDataSource (org.apache.commons.dbcp)
      Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
    • 21 Best Atom Packages for 2021
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

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