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

How to use
AuthenticationServerClient
in
org.eclipse.hono.client

Best Java code snippets using org.eclipse.hono.client.AuthenticationServerClient (Showing top 8 results out of 315)

origin: eclipse/hono

@Override
public void verifyExternal(final String authzid, final String subjectDn, final Handler<AsyncResult<HonoUser>> authenticationResultHandler) {
  client.verifyExternal(authzid, subjectDn, authenticationResultHandler);
}
origin: eclipse/hono

@Override
public void verifyPlain(final String authzid, final String authcid, final String password,
    final Handler<AsyncResult<HonoUser>> authenticationResultHandler) {
  client.verifyPlain(authzid, authcid, password, authenticationResultHandler);
}
origin: eclipse/hono

@Override
protected void doStart(final Future<Void> startFuture) {
  if (factory == null) {
    startFuture.fail("no connection factory for Authentication service set");
  } else {
    client = new AuthenticationServerClient(vertx, factory);
    startFuture.complete();
  }
}
origin: org.eclipse.hono/hono-client

private void getToken(final ProtonConnection openCon, final Future<HonoUser> authResult) {
  final ProtonMessageHandler messageHandler = (delivery, message) -> {
    final String type = MessageHelper.getApplicationProperty(
        message.getApplicationProperties(),
        AuthenticationConstants.APPLICATION_PROPERTY_TYPE,
        String.class);
    if (AuthenticationConstants.TYPE_AMQP_JWT.equals(type)) {
      final String payload = MessageHelper.getPayloadAsString(message);
      if (payload != null) {
        final HonoUser user = new HonoUserAdapter() {
          @Override
          public String getToken() {
            return payload;
          }
        };
        LOG.debug("successfully retrieved token from Authentication service");
        authResult.complete(user);
      } else {
        authResult.fail("message from Authentication service contains no body");
      }
    } else {
      authResult.fail("Authentication service issued unsupported token [type: " + type + "]");
    }
  };
  openReceiver(openCon, messageHandler).compose(openReceiver -> {
    LOG.debug("opened receiver link to Authentication service, waiting for token ...");
  }, authResult);
}
origin: org.eclipse.hono/hono-client

getToken(openCon, userTracker);
origin: org.eclipse.hono/hono-service-base

@Override
protected void doStart(final Future<Void> startFuture) {
  if (factory == null) {
    startFuture.fail("no connection factory for Authentication service set");
  } else {
    client = new AuthenticationServerClient(vertx, factory);
    startFuture.complete();
  }
}
origin: org.eclipse.hono/hono-service-base

@Override
public void verifyPlain(final String authzid, final String authcid, final String password,
    final Handler<AsyncResult<HonoUser>> authenticationResultHandler) {
  client.verifyPlain(authzid, authcid, password, authenticationResultHandler);
}
origin: org.eclipse.hono/hono-service-base

@Override
public void verifyExternal(final String authzid, final String subjectDn, final Handler<AsyncResult<HonoUser>> authenticationResultHandler) {
  client.verifyExternal(authzid, subjectDn, authenticationResultHandler);
}
org.eclipse.hono.clientAuthenticationServerClient

Javadoc

A client for retrieving a token from an authentication service via AMQP 1.0.

Most used methods

  • <init>
    Creates a client for a remote authentication server.
  • getToken
  • openReceiver
  • verifyExternal
    Verifies a Subject DN with a remote authentication server using SASL EXTERNAL. This method currentl
  • verifyPlain
    Verifies username/password credentials with a remote authentication server using SASL PLAIN.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • runOnUiThread (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top PhpStorm 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