ASAP for Rust dependency status build status


This is a rust library for generating and validating ASAP tokens. It provides options for doing so that are compliant with the ASAP specification.

Why should you use this library?

  • Do you want to generate 1 ASAP token/millisecond?
  • Do you want to validate 5 ASAP tokens/millisecond?
  • Do you want to bring your own token Claims in whatever format you'd like?
  • Do you want/need to use ASAP with one of the greatest languages ever?

Basically, yes. Yes, you should use this library if you want ASAP and use Rust.

This repository also provides a useful tool for using ASAP on the command line:

# Install the binary:
cargo install asap_cli

# Setup your ASAP keys:
asap init

# Make an ASAP authorised request via curl:
asap curl https://my-asap-secured-server/

Usage (library)


To install, add the following lines to your Cargo.toml:

asap = "<>"
# These crates are required for defining any extra claims that will be
# serialised into the token (and deserialised out of it).
serde = "1"
serde_json = "1"


And see the documentation and API which should be straightforward enough for anything you'd need.

Usage (binary)

See the help output from the binary itself by running:

asap help


To run tests:

cargo test

Note that some tests need a keyserver to work. They start up the mini keyserver in the workspace on a random port at the beginning of the test. Because each test has its own keyserver, they can run in parallel.



This library is dual licensed under either of the following, at your option:


Pull requests, issues and comments welcome. For pull requests:

  • Add tests for new features and bug fixes
  • Follow the existing style
  • Separate unrelated changes into multiple pull requests
  • See the existing issues for things to start contributing.

For bigger changes, make sure you start a discussion first by creating an issue and explaining the intended change.

Atlassian requires contributors to sign a Contributor License Agreement, known as a CLA. This serves as a record stating that the contributor is entitled to contribute the code/documentation/translation to the project and is willing to have it used in distributions and derivative works (or is willing to transfer ownership).

Prior to accepting your contributions we ask that you please follow the appropriate link below to digitally sign the CLA. The Corporate CLA is for those who are contributing as a member of an organization and the individual CLA is for those contributing as an individual.


This is not an official Atlassian product (experimental or otherwise), it is just code that happens to be owned by Atlassian.