authlib / authlib/example-oauth2-server

Support for Access and Refresh Token in JWT Format.

Aperta
#93 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
705
Fork
279
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi,
Can we generate access and refresh token in JWT format instead of normal string? Also, how can we return JTI values?
Thanks.

**Current Format:**
------------------------
{
"access_token": "6hdWtMlPL1cXrFgZpeaXkkVI0cys5JPEOCZe17FDID",
"expires_in": 3600,
"refresh_token": "TL4GIU9RbZZ2TXzkF4s2gsEGIiV4VezrL3HaMlmTfsmMpTwX",
"scope": "checkcard",
"token_type": "Bearer"
}

**Required Format**
----------------------
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ6.eyJleHAiOjE4NzE2MTcwNzYsInVzZXJfbmFtZSI6Ik5FUFMiLCJhdXRob3JpdGllcyI6WyJVU0VSIl0sImp0aSI6ImU0ZDYwODk5LTllNjctNDJhYy1hMzZmLWM3ZjFjODE4NWI4OCIsImNsaWVudF9pZCI6Ik5FUFMiLCJzY29wZSI6WyJhcGkiXX0.sTuPN5qdLNplTG5BBf1YwYjS9X0b1APMz8nzNNTMGjs",
"token_type": "bearer",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI9IkpXVCJ6.eyJ1c2VyX25hbWUiOiJORVBTIiwic4NvcGUiOlsiYXBpIl0sImF0aSI3ImU0ZDYwODk5LTllNjctNDJhYy1hMzZmLWM3ZjFjODE4NWI4OCIsImV4cCI6MTY3MTYxNzI1NiwiYXV0aG9yaXRpZXMiOlsiVVNFUiJdLCJqdGkiOiI4MGMyNDNkMy1lMWI1LTRlYjctOTU5ZC0zNGJkOWM3NWRkMzMiLCJjbGllbnRfawQiOiJORVBTIn1.gARNnr_LK1hLFJXH_ULBcOvV2CV0xn08ajPee2shL6Q",
"expires_in": 3600,
"scope": "api",
"jti": "e4d60899-9e67-42ac-a36f-c7f1c8185b88"
}

Example guidance would be much appreciated. Tx.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Non vengono indicati file, test o punti di ingresso. Inizia tracciando come vengono generati e serializzati i token di accesso e di refresh, quindi determina come devono essere rappresentati i claims JWT e i valori JTI; il lavoro è completato quando entrambi i token corrispondono al formato di risposta JWT richiesto e il valore JTI viene restituito.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
api, authentication, security
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.