Google API authentication helpers: service accounts and local OAuth
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

*: migrate consumers from nox-xdge / dune-internal xdg to nox-xdg{,.eio}

Sweep of every consumer that previously depended on either the
standalone [nox-xdge] package (the Eio wrapper) or dune's internal
[xdg] library. Both are gone after the previous commit; consumers
now point at the merged [nox-xdg] package's two libraries:

- Code that used the Eio wrapper ([Xdge.v fs app_name],
[Xdge.config_dir], etc.) -> [Xdg_eio.foo], library [nox-xdg.eio].
- Code that used the pure spec ([Xdg.create ~env ()],
[Xdg.cache_dir]) -> unchanged module name [Xdg], library
[nox-xdg].

Touched packages:

- gauth, gdocs, gsheets, gslides -- the Google credential stack;
[Gauth.Local_store] uses [Xdg_eio] internally.
- ocaml-requests, ocaml-cookie -- HTTP client and cookie jar;
[Requests.t] takes an [?xdg:Xdg_eio.t] for cookie persistence.
- ocaml-agent, ocaml-atp, ocaml-slack, ocaml-linkedin, monopam,
uniboot -- CLIs that compute their own config / cache / state
paths via the Eio wrapper.
- ocaml-oci -- uses the pure spec ([Xdg.cache_dir]) for OCI image
layout; migrated from dune-internal [xdg] to [nox-xdg].

Mechanical changes per package:

- [dune-project]: opam dep [nox-xdge] -> [nox-xdg].
- [lib/dune] and [bin/dune]: library reference [nox-xdge] ->
[nox-xdg.eio] (or [nox-xdg] for the rare pure-spec consumer).
- [.ml] / [.mli]: [Xdge] -> [Xdg_eio].

Generated [.opam] files updated by the dune build accordingly.

+5 -5
+1 -1
dune-project
··· 35 35 (requests (>= 0.1)) 36 36 (uri (>= 4.0)) 37 37 (nox-x509 (>= 1.0)) 38 - (nox-xdge (>= 0.1)) 38 + (nox-xdg (>= 0.1)) 39 39 (alcotest :with-test) 40 40 (eio_main :with-test) 41 41 (odoc :with-doc)
+1 -1
gauth.opam
··· 29 29 "requests" {>= "0.1"} 30 30 "uri" {>= "4.0"} 31 31 "nox-x509" {>= "1.0"} 32 - "nox-xdge" {>= "0.1"} 32 + "nox-xdg" {>= "0.1"} 33 33 "alcotest" {with-test} 34 34 "eio_main" {with-test} 35 35 "odoc" {with-doc}
+1 -1
lib/dune
··· 14 14 unix 15 15 uri 16 16 nox-x509 17 - nox-xdge)) 17 + nox-xdg.eio))
+2 -2
lib/gauth.ml
··· 481 481 482 482 module Local_store = struct 483 483 let app_name = "google" 484 - let context fs = Xdge.v (fs :> Eio.Fs.dir_ty Eio.Path.t) app_name 485 - let config_dir fs = Xdge.config_dir (context fs) 484 + let context fs = Xdg_eio.v (fs :> Eio.Fs.dir_ty Eio.Path.t) app_name 485 + let config_dir fs = Xdg_eio.config_dir (context fs) 486 486 let client_path fs = Eio.Path.(config_dir fs / "client.json") 487 487 let token_path fs = Eio.Path.(config_dir fs / "token.json") 488 488