diff --git a/coldcall_lti/templates/cookies_allowed_js_check.html b/coldcall_lti/templates/cookies_allowed_js_check.html new file mode 100644 index 0000000..238530b --- /dev/null +++ b/coldcall_lti/templates/cookies_allowed_js_check.html @@ -0,0 +1,33 @@ + + +
+ +{{ loading_text }}
+ + + + diff --git a/docs/SALTIRE.md b/docs/SALTIRE.md new file mode 100644 index 0000000..a53c158 --- /dev/null +++ b/docs/SALTIRE.md @@ -0,0 +1,85 @@ +# Testing against the saltire LTI platform emulator + +[saltire](https://saltire.lti.app) is the ceLTIc project's hosted LTI +test harness. Its Platform Emulator impersonates an LMS: it performs +the real OIDC handshake, signs a real id_token, and answers NRPS +requests, which makes it the way to exercise the app's actual launch +path without a Canvas Developer Key. This setup was first run and +verified on 2026-08-01 (launch, role routing for both Instructor and +Learner, and a live NRPS roster sync all worked). + +## Local side + +The app must be served over HTTPS, because real LTI session cookies +are `Secure; SameSite=None`. A self-signed certificate is fine — you +accept it once in the browser: + +``` +# one-time: tool keypair and TLS cert (all live in instance/, gitignored) +openssl genrsa -out instance/private.key 4096 +openssl rsa -in instance/private.key -pubout -out instance/public.key +openssl req -x509 -newkey rsa:2048 -keyout instance/tls-key.pem \ + -out instance/tls-cert.pem -days 30 -nodes -subj "/CN=localhost" + +# run +.venv/bin/python -m flask --app coldcall_lti run --port 5443 \ + --cert instance/tls-cert.pem --key instance/tls-key.pem +``` + +Then open https://localhost:5443/healthz once and click through the +certificate warning (Advanced → Proceed). + +`instance/lti_config.json` describes the saltire platform to the app. +The working shape (fill the session id — see the caveat below): + +```json +{ + "https://saltire.lti.app/platform": [ + { + "default": true, + "client_id": "saltire.lti.app", + "auth_login_url": "https://saltire.lti.app/platform/auth", + "auth_token_url": "https://saltire.lti.app/platform/token/