acm-udayton / acm-udayton/ACM-Meeting-Records

[FEATURE] Add JWT authentication endpoints

Aperta
#157 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Python
Stelle
7
Fork
2
Merge medio
4g 23h
PR unite (30g)
2

Descrizione

## Feature Description

Replicate our existing session-based authentication and MFA flow with JWTs.

---

## Acceptance Criteria & Solution Requirements
*To close this issue, the following must be met (can be finalized in the comments):*
- [ ] 1. Application runs as expected with the new feature integrated seamlessly.
- [ ] 2. Code quality metrics are maintained, and linting has been considered in development.
- [ ] 3. Testing metrics are maintained, and tests have been updated/added wherever relevant during development.
- [ ] 4. Documentation has been updated to reflect the changes made during development.
- [ ] 5. Add a /api/v1/login REST endpoint to request username and password. If not an MFA-enabled account, issue the `access_token` and `refresh_token` JWTs. If MFA is enabled, issue a short-lived (5 minutes) intermediate `mfa_token`.
- [ ] 6. Add a /api/v1/mfa-otp REST endpoint to request MFA OTP. Require a `mfa_token` be sent as the bearer. If MFA is correct, issue the `access_token` and `refresh_token` JWTs.
- [ ] 7. Add a /api/v1/mfa-recovery REST endpoint to request MFA recovery code. Require a `mfa_token` be sent as the bearer. If MFA is correct, issue the `access_token` and `refresh_token` JWTs.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Look at the existing session-based authentication and MFA flow in the codebase to understand the current structure. The new JWT endpoints (/api/v1/login, /api/v1/mfa-otp, /api/v1/mfa-recovery) need to be added, likely in a file like `auth.py` or `views.py`. You'll need to integrate a JWT library (like PyJWT) and ensure token generation, validation, and refresh logic work. Check for existing tests related to authentication to update or add new ones.

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

Valutazione

Stack tecnologico
python
Ambito
api, authentication, backend
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.