Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
cbad40d
feat(session): implement session type, generation, encoding and storage
MNassimM Mar 31, 2025
a382171
feat(api/login): add endpoint Login to return session for token
MNassimM Mar 31, 2025
a418491
feat(index_main): use Login endpoint with permanent token
MNassimM Mar 31, 2025
1614112
refactor!(api,server): replace token with session in routes
MNassimM Apr 7, 2025
3b95577
refactor(app): replace token with session in API calls and local_storage
MNassimM Apr 7, 2025
8671ab2
feat(session): add Cryptokit‑based session generation and parsing
MNassimM Apr 22, 2025
ef77eac
feat(api): implement Get_token endpoint
MNassimM Apr 23, 2025
a64ee69
feat!(api): change Create_teacher_token to accept session instead of …
MNassimM Apr 23, 2025
06ab52c
refactor(client): remove deprecated from local storage and front-end
MNassimM Apr 23, 2025
228b6af
feat(api): add v2.0 session-based “_s” endpoints (token routes kept f…
MNassimM Apr 29, 2025
de81b65
feat(ui): auto-migrate legacy to v2 session auth
MNassimM Apr 29, 2025
e86c0d1
deps(opam): Add Irmin-git 3.10.0
MNassimM May 26, 2025
c4839ff
feat(state): Store session-token links using Irmin instead of JSON file
MNassimM May 28, 2025
e3aa532
build(docker): Bump alpine-3.20 -> alpine-3.21
erikmd Jun 3, 2025
0000ded
build(docker): Use opam-2.3 and run `opam init --reinit -ni` first
erikmd Jun 3, 2025
57cb49a
build(macos): Add missing system packages for {conf-libffi,conf-zlib}
erikmd Jun 3, 2025
7ce615a
refactor(Learnocaml_store): Move Json_codec to Learnocaml_api
erikmd Jun 3, 2025
d15c588
deps(docker): Add gmp alpine package
erikmd Jun 3, 2025
b3552ac
feat(state): add LtiIndex and TokenIndex modules for external authent…
MNassimM Jul 21, 2025
922f6de
feat(api): add LTI authentication endpoints to request type and conve…
MNassimM Jul 21, 2025
6bd22c8
feat(ui): add LTI login, registration (and association) forms in HTML…
MNassimM Jul 21, 2025
6864ce6
feat(auth): modular authentication framework, LTI entrypoints, and AP…
MNassimM Jul 21, 2025
bae56c6
feat(auth,lti): implement LTI-token association and modularize authen…
MNassimM Jul 21, 2025
18adc2d
feat(auth,lti): implement LTI registration endpoint and secure user c…
MNassimM Jul 21, 2025
5ffe772
feat(app/lti): add LTI entry point, build, and utilities for modular …
MNassimM Jul 21, 2025
5778054
feat(server): add use_lti flag to Server preconfig and config structures
MNassimM Jul 23, 2025
9cb89e9
fix(auth): properly check OAuth signature and set launch URL
MNassimM Jul 23, 2025
ebde3ee
fix(auth/lti): escape Irmin key to avoid : and use / for key path
MNassimM Jul 25, 2025
74bf487
test(lti): setup inline tests for LTI OAuth + inject secret in check_…
MNassimM Jul 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .ci-macosx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ brew install pkg-config
brew install opam
brew install libev
brew install openssl
brew install libffi
brew install zlib

opam init -y -a --bare

opam switch create . ocaml-base-compiler --deps-only --locked -y -j 2 # -v
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/static-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ jobs:
brew install openssl@3 # Workaround https://github.com/ocaml/opam-repository/issues/19676
brew install zstd # Install zstd to avoid "ld: Undefined symbols: _ZSTD_*" at linking time
# ^-> see also https://github.com/ocaml/ocaml/issues/12562
brew install libffi zlib # needed since https://github.com/ocaml-sf/learn-ocaml/pull/610
opam switch create . ocaml-base-compiler --deps-only
- name: Build the binaries
run: |
Expand Down
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM ocaml/opam:alpine-3.20-ocaml-5.1 as compilation
FROM ocaml/opam:alpine-3.21-ocaml-5.1 as compilation
LABEL Description="learn-ocaml building" Vendor="OCamlPro"

WORKDIR /home/opam/learn-ocaml

COPY learn-ocaml.opam learn-ocaml.opam.locked learn-ocaml-client.opam learn-ocaml-client.opam.locked ./
RUN sudo chown -R opam:nogroup .
RUN sudo ln -sf /usr/bin/opam-2.3 /usr/bin/opam && opam init --reinit -ni

ENV OPAMYES true
RUN echo 'archive-mirrors: [ "https://opam.ocaml.org/cache" ]' >> ~/.opam/config \
Expand All @@ -28,7 +29,7 @@ RUN cat /proc/cpuinfo /proc/meminfo
RUN opam install . --destdir /home/opam/install-prefix --locked


FROM alpine:3.20 as client
FROM alpine:3.21 as client

RUN apk update \
&& apk add ncurses-libs libev dumb-init libssl3 libcrypto3 \
Expand All @@ -45,10 +46,10 @@ COPY --from=compilation /home/opam/install-prefix/bin/learn-ocaml-client /usr/bi
ENTRYPOINT ["dumb-init","/usr/bin/learn-ocaml-client"]


FROM alpine:3.20 as program
FROM alpine:3.21 as program

RUN apk update \
&& apk add ncurses-libs libev dumb-init git openssl lsof \
&& apk add ncurses-libs libev dumb-init git gmp openssl lsof \
&& addgroup learn-ocaml \
&& adduser learn-ocaml -DG learn-ocaml

Expand Down
5 changes: 3 additions & 2 deletions Dockerfile.test-client
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# This Dockerfile is useful for testing purposes
# to ensure learn-ocaml-client can be built alone from learn-ocaml-client.opam

FROM ocaml/opam:alpine-3.20-ocaml-5.1 as compilation
FROM ocaml/opam:alpine-3.21-ocaml-5.1 as compilation
LABEL Description="learn-ocaml building" Vendor="OCamlPro"

WORKDIR /home/opam/learn-ocaml

# Note: don't copy learn-ocaml.opam.locked
COPY learn-ocaml-client.opam learn-ocaml.opam ./
RUN sudo chown -R opam:nogroup .
RUN sudo ln -sf /usr/bin/opam-2.3 /usr/bin/opam && opam init --reinit -ni

ENV OPAMYES true
RUN echo 'archive-mirrors: [ "https://opam.ocaml.org/cache" ]' >> ~/.opam/config \
Expand All @@ -34,7 +35,7 @@ RUN opam install learn-ocaml-client --destdir /home/opam/install-prefix \
&& ls -l /home/opam/install-prefix/bin/learn-ocaml-client


FROM alpine:3.20 as client
FROM alpine:3.21 as client

ARG BUILD_DATE
ARG VCS_BRANCH
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile.test-server
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# This Dockerfile is useful for testing purposes
# to ensure learn-ocaml can be built alone from learn-ocaml.opam

FROM ocaml/opam:alpine-3.20-ocaml-5.1 as compilation
FROM ocaml/opam:alpine-3.21-ocaml-5.1 as compilation
LABEL Description="learn-ocaml building" Vendor="OCamlPro"

WORKDIR /home/opam/learn-ocaml

# Note: don't copy learn-ocaml.locked
COPY learn-ocaml.opam learn-ocaml-client.opam ./
RUN sudo chown -R opam:nogroup .
RUN sudo ln -sf /usr/bin/opam-2.3 /usr/bin/opam && opam init --reinit -ni

ENV OPAMYES true
RUN echo 'archive-mirrors: [ "https://opam.ocaml.org/cache" ]' >> ~/.opam/config \
Expand Down Expand Up @@ -37,7 +38,7 @@ RUN opam install learn-ocaml --destdir /home/opam/install-prefix \
&& ls -l /home/opam/install-prefix/bin/learn-ocaml


FROM alpine:3.20 as program
FROM alpine:3.21 as program

ARG BUILD_DATE
ARG VCS_BRANCH
Expand All @@ -54,7 +55,7 @@ LABEL org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.schema-version="1.0"

RUN apk update \
&& apk add ncurses-libs libev dumb-init git openssl lsof \
&& apk add ncurses-libs libev dumb-init git gmp openssl lsof \
&& addgroup learn-ocaml \
&& adduser learn-ocaml -DG learn-ocaml

Expand Down
3 changes: 3 additions & 0 deletions demo-repository/server_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"use_lti": true
}
38 changes: 18 additions & 20 deletions learn-ocaml-client.opam.locked
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ bug-reports: "https://github.com/ocaml-sf/learn-ocaml/issues"
depends: [
"angstrom" {= "0.15.0"}
"asak" {= "0.5"}
"asn1-combinators" {= "0.2.6"}
"asn1-combinators" {= "0.3.2"}
"astring" {= "0.8.5"}
"base" {= "v0.16.3"}
"base-bigarray" {= "base"}
Expand All @@ -34,16 +34,16 @@ depends: [
"base-unix" {= "base"}
"base64" {= "3.5.0"}
"bigarray-compat" {= "1.1.0"}
"bigstringaf" {= "0.8.0"}
"bigstringaf" {= "0.10.0"}
"bos" {= "0.2.1"}
"ca-certs" {= "0.2.3"}
"cmdliner" {= "1.1.0"}
"cohttp" {= "4.0.0"}
"cohttp-lwt" {= "4.0.0"}
"cohttp-lwt-unix" {= "4.0.0"}
"conduit" {= "4.0.2"}
"conduit-lwt" {= "4.0.2"}
"conduit-lwt-unix" {= "4.0.2"}
"ca-certs" {= "1.0.0"}
"cmdliner" {= "1.3.0"}
"cohttp" {= "5.3.1"}
"cohttp-lwt" {= "5.3.0"}
"cohttp-lwt-unix" {= "5.3.0"}
"conduit" {= "7.0.0"}
"conduit-lwt" {= "7.0.0"}
"conduit-lwt-unix" {= "7.0.0"}
"conf-bash" {= "1"}
"conf-gmp" {= "4"}
"conf-gmp-powm-sec" {= "3"}
Expand All @@ -55,7 +55,7 @@ depends: [
"digestif" {= "1.2.0"}
"domain-name" {= "0.4.0"}
"dune" {= "3.16.0"}
"dune-configurator" {= "2.9.3"}
"dune-configurator" {= "3.17.2"}
"duration" {= "0.2.1"}
"eqaf" {= "0.9"}
"ezjsonm" {= "1.3.0"}
Expand All @@ -75,6 +75,7 @@ depends: [
"json-data-encoding" {= "1.0.1"}
"jsonm" {= "1.0.1"}
"jst-config" {= "v0.16.0"}
"kdf" {= "1.0.0"}
"logs" {= "0.7.0"}
"lwt" {= "5.7.0"}
"lwt_ssl" {= "1.1.3"}
Expand All @@ -84,11 +85,10 @@ depends: [
"menhirCST" {= "20231231"}
"menhirLib" {= "20231231"}
"menhirSdk" {= "20231231"}
"mirage-crypto" {= "0.11.3"}
"mirage-crypto-ec" {= "0.11.3"}
"mirage-crypto-pk" {= "0.11.3"}
"mirage-crypto-rng" {= "0.11.3"}
"num" {= "1.4"}
"mirage-crypto" {= "1.1.0"}
"mirage-crypto-ec" {= "1.1.0"}
"mirage-crypto-pk" {= "1.1.0"}
"mirage-crypto-rng" {= "1.1.0"}
"ocaml" {= "5.1.1"}
"ocaml-compiler-libs" {= "v0.12.4"}
"ocaml-config" {= "3"}
Expand All @@ -99,9 +99,8 @@ depends: [
"ocp-indent-nlfork" {= "1.5.5"}
"ocp-ocamlres" {= "0.4"}
"ocplib-endian" {= "1.2"}
"ohex" {= "0.2.0"}
"omd" {= "1.3.2"}
"parsexp" {= "v0.16.0"}
"pbkdf" {= "1.2.0"}
"pprint" {= "20220103"}
"ppx_assert" {= "v0.16.0"}
"ppx_base" {= "v0.16.0"}
Expand All @@ -124,7 +123,6 @@ depends: [
"rresult" {= "0.7.0"}
"sedlex" {= "3.2"}
"seq" {= "base"}
"sexplib" {= "v0.16.0"}
"sexplib0" {= "v0.16.0"}
"ssl" {= "0.7.0"}
"stdio" {= "v0.16.0"}
Expand All @@ -137,7 +135,7 @@ depends: [
"uri-sexp" {= "4.2.0"}
"uutf" {= "1.0.3"}
"vg" {= "0.9.4"}
"x509" {= "0.16.5"}
"x509" {= "1.0.5"}
"yojson" {= "2.2.2"}
"zarith" {= "1.13"}
]
Expand Down
4 changes: 3 additions & 1 deletion learn-ocaml.opam
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ depends: [
"cohttp-lwt-unix" {>= "2.0.0"}
"conduit-lwt-unix" {< "7.1.0"}
"conf-git"
"decompress" {= "0.8.1"}
"cryptokit"
"decompress" {>= "1.5.3"}
"digestif" {>= "1.2.0"}
"dune" {>= "2.3.0"}
"easy-format" {>= "1.3.0" }
"ezjsonm"
"ipaddr" {>= "2.9.0" }
"irmin-git" {= "3.10.0"}
"js_of_ocaml" {>= "5.0.0" & < "6.0.0"}
"js_of_ocaml-compiler" {>= "5.0.0" & < "6.0.0"}
"js_of_ocaml-lwt"
Expand Down
Loading