numbas / numbas-lti-provider

An LTI tool provider to run Numbas exams
https://docs.numbas.org.uk/lti/en/latest/
Other
11 stars 12 forks source link

Cache LTI 1.3 access tokens #349

Closed christianp closed 3 days ago

christianp commented 1 week ago

At the moment, the pylti1p3 library requests a new access token each time a ServiceConnector object is made. We make a new ServiceConnector object each time we do anything with the assignments and grades service.

The ServiceConnector should store access tokens in the django cache, and use the expires_in property of the returned object to expire it. (spec)

This is causing us to be rate-limited when reporting scores back.

christianp commented 3 days ago

Done in https://github.com/christianp/pylti1.3/commit/daeecaf14c041d0bbe97d5411107f68dd145cf74