Skip to content

Commit 150f5b8

Browse files
committed
Add simple README.
1 parent f9d9232 commit 150f5b8

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
SciTokens C++ Library
3+
=====================
4+
5+
This repository implements a minimal library for creating and using SciTokens from C or C++.
6+
7+
[SciTokens](https://scitokens.org) provide a token format for distributed authorization. The
8+
tokens are self-describing, can be verified in a distributed fashion (no need to contact the
9+
issuer to determine if the token is valid). This is convenient for a federated environment where
10+
several otherwise-independent storage endpoints want to delegate trust for an issuer for
11+
managing a storage allocation.
12+
13+
Building
14+
--------
15+
16+
To build the `scitokens-cpp` library, the following dependencies are needed:
17+
18+
- [jwt-cpp](https://github.com/Thalhammer/jwt-cpp): A header-only C++ library for manipulating
19+
JWTs.
20+
- OpenSSL 1.0 or later.
21+
- `sqlite3`
22+
23+
CMake is used for the build system. To build, from the source directory:
24+
25+
```
26+
mkdir build
27+
cd build
28+
JWT_CPP_DIR=~/path/to/jwt-cpp cmake ..
29+
make
30+
```
31+
32+
Testing
33+
-------
34+
35+
The easiest way to test `scitokens-cpp` is to head to the [SciTokens Demo app](https://demo.scitokens.org)
36+
and copy the generated token. Then, from the build directory:
37+
38+
```
39+
./scitokens-verify eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImtleS1yczI1NiJ9.eyJpc3MiOiJodHRwczovL2RlbW8uc2NpdG9rZW5zLm9yZyIsImV4cCI6MTU0NjQ1NjMwOSwiaWF0IjoxNTQ2NDU1NzA5LCJuYmYiOjE1NDY0NTU3MDksImp0aSI6ImRlYmNkZDRjLTU1MzgtNDkxNS1hY2U2LTgyNTg3NGQwZjEzNyJ9.Vu9TRfDi5WJujeAGl-wP-atvNqh31-gteKqqu_IEcxoCfGYdmoIM3xOOY1GmHcmXfclkrl724ldxBBChsDpcdi_8914N9EGwGVApJLQU0SaPPdtcoCrqvVJE3bD9fs6UKooGwuk_e20ml9g0R4100fTdsD7pkIOABYGTbhxioEb1dP1o-17l2t2kUXpd8KhIyZZjmtmnMdmO5bxaY_V60OOWekwelT8ACK8ao39Ocf_wmUiS0VVX21hD1KqO0bgBU9AsVJ5prAL9ytElr_UB2X5KowPODbj6LPFNhpCwXcoG4w4Gw9VueuxCuIPhlcHBhP83i5LPgtk2YOjygdSahA
40+
```
41+
42+
Replace the given token above with the fresh one you just generated; using the above token should give an expired
43+
token error.
44+

0 commit comments

Comments
 (0)