fec26089ed
- Added JWT authentication support with configurable secret and expiration. - Introduced optional API key validation for endpoints. - Implemented tracking of publication downloads by researchers, storing records in a new PublicationDownload model. - Updated export endpoints to conditionally register downloads based on user authentication. - Enhanced researcher search response to indicate if publications were downloaded by the current user. - Updated environment configuration to include new JWT settings.
19 lines
515 B
Bash
19 lines
515 B
Bash
ORCID_CLIENT_ID=123412341234
|
|
ORCID_CLIENT_SECRET=123412341234
|
|
|
|
API_KEY_NAME=X-API-Key
|
|
API_KEY_VALUE=123412341234
|
|
|
|
DATABASE_URL=postgresql://postgres:postgres@db:5432/orcid_db
|
|
REDIS_URL=redis://redis:6379/0
|
|
|
|
BASE_URL=http://localhost:8000/api
|
|
|
|
# JWT (login ORCID)
|
|
JWT_SECRET=change_me
|
|
JWT_ALGORITHM=HS256
|
|
JWT_EXPIRES_MINUTES=720
|
|
|
|
# ORCID OAuth 3-legged (authorization code)
|
|
# Debe coincidir exactamente con el redirect URI configurado en tu app ORCID.
|
|
ORCID_REDIRECT_URI=http://localhost:8000/api/auth/orcid/callback |