Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.62 KB

README.md

File metadata and controls

39 lines (26 loc) · 1.62 KB

NATS

Auth Callout

An example that demonstrates a basic Auth Callout handler. Run the main from the AuthCalloutServiceExample class.

Example Notes

  1. You must start the NATS server using the auth-callout-no-encrypt.conf configuration file found in this directory. For example:

    nats-server -c /<nats-stuff>/java-nats-examples/auth-callout/auth-callout-no-encrypt.conf
  2. The Java NKeys and JWT libraries do not yet support encrypted auth callout.

Library Dependencies

  1. The example depends on the jwt.java library. That library has been extracted from the JNATS client and reorganized to avoid clashing with the original, which has been left in the client. It started out identical but was improved and expanded to support Auth Callout.

  2. The jwt.java library depends on two other libraries that have been extracted from the JNATS client. They both also have been reorganized to avoid clashing with the original, but otherwise are essentially the same. The libraries are json.java and nkeys.java The dependency tree looks like this:

    +--- io.nats:jwt-java:2.0.0
         +--- io.nats:nkeys-java:2.0.1
         \--- io.nats:jnats-json:2.0.0
    

License

License Apache 2

Unless otherwise noted, the NATS source files are distributed under the Apache Version 2.0 license found in the LICENSE file.