@@ -48,6 +48,20 @@ Each time you call ``generate_jwt`` this will find the latest active key file (e
4848 signer = atlassian_jwt_auth.create_signer_from_file_private_key_repository(' issuer' , ' /opt/jwtprivatekeys' )
4949 a_jwt = signer.generate_jwt(' audience' )
5050
51+ To create a JWT using a data uri
52+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53+
54+ .. code :: python
55+
56+ import atlassian_jwt_auth
57+ from atlassian_jwt_auth.key import DataUriPrivateKeyRetriever
58+
59+ key_id, private_key_pem = DataUriPrivateKeyRetriever(' Your base64 encoded data uri' ).load(' issuer' )
60+ signer = atlassian_jwt_auth.create_signer(' issuer' , ' issuer/key' , private_key_pem)
61+ a_jwt = signer.generate_jwt(' audience' )
62+
63+
64+
5165 To make an authenticated HTTP request
5266~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5367
@@ -72,7 +86,7 @@ to authenticate ``aiohttp`` requests:
7286.. code :: python
7387
7488 import aiohttp
75-
89+
7690 import atlassian_jwt_auth
7791 from atlassian_jwt_auth.contrib.aiohttp import JWTAuth
7892
@@ -115,7 +129,7 @@ To verify a JWT
115129
116130 For Python versions starting from ``Python 3.5 `` ``atlassian_jwt_auth.contrib.aiohttp ``
117131provides drop-in replacements for the components that
118- perform HTTP requests, so that they use ``aiohttp `` instead of ``requests ``:
132+ perform HTTP requests, so that they use ``aiohttp `` instead of ``requests ``:
119133
120134.. code :: python
121135
0 commit comments