Crates.io | asap_cli |
lib.rs | asap_cli |
version | 0.4.0 |
source | src |
created_at | 2019-01-07 04:37:18.266125 |
updated_at | 2023-04-14 00:19:54.624299 |
description | A helpful command line utility for using ASAP. |
homepage | https://bitbucket.org/atlassianlabs/rust-asap/ |
repository | https://bitbucket.org/atlassianlabs/rust-asap/ |
max_upload_size | |
id | 105969 |
size | 65,665 |
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?
Claims
in whatever format you'd like?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/
To install, add the following lines to your Cargo.toml
:
asap = "<latest-version-from-crates.io>"
# 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.
See the help output from the binary itself by running:
asap help
This project is managed by cargo
. It also includes a justfile
to make some things easier - read that file to see which commands are run for common operations. For example:
# Run all the tests:
just test
# Run the `asap` cli tool:
just run --audience "server" curl "https://my.server.net"
# Publish the updated crates:
just publish
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:
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.