• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

cmake/H23-Apr-2021-5750

dist/H03-May-2022-10074

examples/H03-May-2022-342270

images/H03-May-2022-

include/H03-May-2022-967115

libjwt/H03-May-2022-3,7082,686

m4/H23-Apr-2021-852767

tests/H03-May-2022-3,3542,504

.gitignoreH A D23-Apr-2021641 5147

.travis.ymlH A D23-Apr-2021341 2421

LICENSEH A D23-Apr-202116.3 KiB374293

Makefile.amH A D03-May-2022289 1510

README.cmake.mdH A D23-Apr-20211.2 KiB4526

README.mdH A D23-Apr-20211 KiB2917

configure.acH A D23-Apr-20211.3 KiB6148

doxygen.cfgH A D23-Apr-2021104.1 KiB2,4301,879

doxygen.mkH A D23-Apr-20214.6 KiB18981

README.cmake.md

1Build Instructions for CMake
2============================
3
41. Generate build tree.
5
6        mkdir out
7        cd out
8        cmake -G "Ninja" -DBUILD_TESTS=1 ..
9
10    NOTE: If you prefer, substitute "Unix Makefiles" or other cmake build generator.
11
122. Build all.
13
14        ninja
15
16    NOTE: If using different build tool, `cmake --build .` will work.
17
183. Run tests.
19
20        ninja check
21
22    NOTE: If using different build tool, `cmake --build . --target check` will work.
23
24Examples
25--------
26
27Two example utilities are provided to demonstrate generating JWT and for
28authenticating JWT, jwtgen and jwtauth.
29
301. Generate a token using RS256 signature with the sample private key.
31
32    cd out/examples
33    ./jwtgen -k ../../tests/keys/rsa_key_2048.pem -a RS256 -c iss=example.com -c sub=user0 > user0.jwt
34
352. Authenticate a token using RS256 signature with the sample public key.
36
37    cd out/examples
38    ./jwtauth -k ../../tests/keys/rsa_key_2048-pub.pem --alg RS256 user0.jwt
39
403. Authenticate a token using RS256 signature with the sample public key, verifying user is user1.
41
42    cd out/examples
43    ./jwtauth -k ../../tests/keys/rsa_key_2048-pub.pem --alg RS256 -c sub=user1 user0.jwt
44
45

README.md

1![LibJWT Logo](https://user-images.githubusercontent.com/320303/33439880-82406da4-d5bc-11e7-8959-6d53553c1984.png)
2
3# JWT C Library
4
5[![Build Status](https://travis-ci.org/benmcollins/libjwt.svg?branch=master)](https://travis-ci.org/benmcollins/libjwt) [![codecov.io](http://codecov.io/github/benmcollins/libjwt/coverage.svg?branch=master)](http://codecov.io/github/benmcollins/libjwt?branch=master)
6
7[![View on JWT.IO](http://jwt.io/img/badge.svg)](https://jwt.io)
8
9## Build Requirements
10
11- https://github.com/akheron/jansson
12- OpenSSL or GnuTLS
13
14## Documentation
15
16[GitHub Pages](http://benmcollins.github.io/libjwt/)
17
18## Pre-built Ubuntu Packages (PPA)
19
20`sudo add-apt-repository ppa:ben-collins/libjwt`
21
22## Build Instructions
23
24**With GNU Make:** Use ``autoreconf -i`` to create project files and run ``./configure``.
25- ``make all``: build library.
26- ``make check``: build and run test suite.
27- See INSTALL file for more details on GNU Auto tools and GNU Make.
28- Use the ``--without-openssl`` with ``./configure`` to use GnuTLS.
29