aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-11-29 11:38:13 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-12-02 09:37:25 +0200
commit7c741902f937bd6dbb676199c6ad2cfc0f433db4 (patch)
tree592a92b38115df195f0bf306652d7bd1635e8d4b /mod
parentf2bd0672d1af5616cfc0d0ac006a69fca6c99bb4 (diff)
service_data: parse IAT using gh_installation_access_token ctor
Diffstat (limited to 'mod')
-rw-r--r--mod/mod-ci-github-service-data.cxx23
1 files changed, 2 insertions, 21 deletions
diff --git a/mod/mod-ci-github-service-data.cxx b/mod/mod-ci-github-service-data.cxx
index dedc1ab..d3071b2 100644
--- a/mod/mod-ci-github-service-data.cxx
+++ b/mod/mod-ci-github-service-data.cxx
@@ -51,27 +51,8 @@ namespace brep
// Installation access token (IAT).
//
- p.next_expect_member_object ("installation_access");
-
- // IAT token.
- //
- installation_access.token = p.next_expect_member_string ("token");
-
- // IAT expires_at.
- {
- string v (p.next_expect_member_string ("expires_at"));
-
- try
- {
- installation_access.expires_at = gh_from_iso8601 (v);
- }
- catch (const invalid_argument& e)
- {
- throw_json (p, string ("invalid IAT expires_at value: ") + e.what ());
- }
- }
-
- p.next_expect (event::end_object); // IAT
+ p.next_expect_name ("installation_access");
+ installation_access = gh_installation_access_token (p);
installation_id =
p.next_expect_member_number<uint64_t> ("installation_id");