giftless
giftless copied to clipboard
default_lifetime config value set in yml config is ignored in favour of default value from `config.py`
The default_lifetime value set inside giftless.yml file is ignored and Giftless JWT tokens generated by auth.jwt.JWTAuthenticator._generate_token are using default values from giftless.config.py
# my giftless.yml
TRANSFER_ADAPTERS:
basic:
factory: giftless.transfer.basic_streaming:factory
options:
storage_class: giftless.storage.local_storage:LocalStorage
AUTH_PROVIDERS:
- factory: giftless.auth.jwt:factory
options:
algorithm: RS256
public_key_file: /jwt_public_key.pem
default_lifetime: 300 <<<<<<<<<< Custom default lifetime value set
MIDDLEWARE:
- class: werkzeug.middleware.proxy_fix:ProxyFix
kwargs:
x_host: 1
x_port: 1
x_prefix:
I'm quite sure that the yml config is configured properly as the other values are read and used as expected.
Unfortunately I'm not able to create a test showcasing this bug behavior. I have tested that it doesn't work only locally with breakpoints at auth.jwt.JWTAuthenticator._generate_token and by investigating the request being sent to giftless in the browser (verifying jwt tokens expiration dates).
This was checked with latest tag 0.0.5 as well as latest master branch of the repo.