code: private void validateCredentials(String username, String password, ApiRequest request, IPolicyContext context,
              BasicAuthenticationConfig config, IAsyncResultHandler<Boolean> handler) {
          if (config.getStaticIdentity() != null) {
              staticIdentityValidator.validate(username, password, request, context, config.getStaticIdentity(), handler);
          } else if (config.getLdapIdentity() != null) {
              ldapIdentityValidator.validate(username, password, request, context, config.getLdapIdentity(), handler);
          } else if (config.getJdbcIdentity() != null) {
              jdbcIdentityValidator.validate(username, password, request, context, config.getJdbcIdentity(), handler);
          } else {
              handler.handle(AsyncResultImpl.create(Boolean.FALSE));
          }
      }
docs: Validate the inbound authentication credentials.
  @param username
  @param password
  @param request
  @param context
  @param config
  @param handler