academic-innovation / django-lti

LTI Advantage support for Django projects.
https://academic-innovation.github.io/django-lti/
MIT License
16 stars 7 forks source link

Store and use platform audience #48

Open michaelwheeler opened 1 year ago

michaelwheeler commented 1 year ago

This value can optionally be provided by the platform, in which case it will be used by the tool when requesting an auth token.

michaelwheeler commented 1 month ago

When creating a service token for a client_credentials token request, multiple values from the registration are used:

Construction of the service token in pylti1p3 can be seen here: https://github.com/dmitry-viskov/pylti1.3/blob/d8fa43e1ace2885e84dfa4067f0f7379aaa86826/pylti1p3/service_connector.py#L54-L69

It seems like it should be enough to add an aud field to the LtiRegistration model and ensure that it is used in the to_registration method when available.