Tabnine Logo
AuthHandler
Code IndexAdd Tabnine to your IDE (free)

How to use
AuthHandler
in
org.eclipse.hono.service.auth.device

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

origin: eclipse/hono

private Future<DeviceUser> authenticate(final MqttContext connectContext, final Span currentSpan) {
  return authHandler.authenticateDevice(connectContext);
}
origin: eclipse/hono

  private void parseCredentials(
      final int idx,
      final T context,
      final Throwable lastException,
      final Handler<AsyncResult<JsonObject>> resultHandler) {

    if (idx >= handlerChain.size()) {

      // no providers left to try to extract credentials
      resultHandler.handle(Future.failedFuture(lastException));

    } else {

      final AuthHandler<T> handler = handlerChain.get(idx);
      handler.parseCredentials(context).setHandler(r -> {

        if (r.failed()) {
          parseCredentials(idx + 1, context, r.cause(), resultHandler);
        } else {
          context.put(AUTH_PROVIDER_CONTEXT_KEY, handler.getAuthProvider());
          resultHandler.handle(Future.succeededFuture(r.result()));
        }
      });
    }
  }
}
org.eclipse.hono.service.auth.deviceAuthHandler

Javadoc

An authentication handler for execution contexts.

Most used methods

  • authenticateDevice
    Authenticates a device.
  • getAuthProvider
    Gets the auth provider that can be used to validate the credentials parsed by this handler.
  • parseCredentials
    Parses the credentials from the execution context into a JsonObject. Implementations should be able

Popular in Java

  • Creating JSON documents from java classes using gson
  • compareTo (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setRequestProperty (URLConnection)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JLabel (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Best plugins for Eclipse
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