code: public static Authenticator buildAuthenticatorWithSharedSecret(final String key) {
          if (key != null && !key.isEmpty()) {
              return new JwtAuthenticator(hmacShaKeyFor(key.getBytes(UTF_8)));
          }
          return null;
      }
docs: Build an authenticator.
  @param key the key
  @return an Authenticator