File: index.rst

package info (click to toggle)
python-authlib 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,724 kB
  • sloc: python: 22,292; makefile: 49; javascript: 37; sh: 10
file content (34 lines) | stat: -rw-r--r-- 657 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.. _jose:

JOSE Guide
==========

This part of the documentation contains information on the JOSE implementation.
It includes:

1. JSON Web Signature (JWS)
2. JSON Web Encryption (JWE)
3. JSON Web Key (JWK)
4. JSON Web Algorithm (JWA)
5. JSON Web Token (JWT)

A simple example on how to use JWT with Authlib::

    from authlib.jose import jwt

    with open('private.pem', 'rb') as f:
        key = f.read()

    payload = {'iss': 'Authlib', 'sub': '123', ...}
    header = {'alg': 'RS256'}
    s = jwt.encode(header, payload, key)

Follow the documentation below to find out more in detail.

.. toctree::
    :maxdepth: 2

    jws
    jwe
    jwk
    jwt