Skip to content

Commit

Permalink
Merge pull request #178 from GLEIF-IT/feature/include_signed_headers_…
Browse files Browse the repository at this point in the history
…in_checklogin_request

Added signed headers to /checklogin request. Updated  docker-compose
  • Loading branch information
aydarng authored Jan 29, 2025
2 parents 82da64b + 46dadc9 commit 031b585
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
11 changes: 4 additions & 7 deletions signify-ts-test/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,14 @@ services:
- 5644:5644

reg-pilot-api:
image: gleif/reg-pilot-api:dev
image: gleif/reg-pilot-api:latest
ports:
- 8000:8000
environment:
- ENABLE_CORS=true
- VERIFIER_AUTHORIZATIONS=http://vlei-verifier:7676/authorizations/
- VERIFIER_PRESENTATIONS=http://vlei-verifier:7676/presentations/
- VLEI_VERIFIER=http://vlei-verifier:7676
- FILER_REPORTS=http://reg-pilot-filer:7878/reports/
- FILER_ADMIN_UPLOAD_STATUSES=http://reg-pilot-filer:7878/admin/upload_statuses/
- VERIFIER_REQUESTS=http://vlei-verifier:7676/request/verify/
- VERIFIER_ADD_ROT=http://vlei-verifier:7676/root_of_trust/
healthcheck:
test: ["CMD", "wget", "--spider", "http://reg-pilot-api:8000/ping"]
interval: 2s
Expand All @@ -94,7 +91,7 @@ services:
start_period: 2s

vlei-verifier:
image: gleif/vlei-verifier:dev
image: gleif/vlei-verifier:latest
container_name: vlei-verifier
hostname: vlei-verifier
environment:
Expand All @@ -112,7 +109,7 @@ services:
start_period: 2s

reg-pilot-filer:
image: gleif/reg-pilot-filer:dev
image: gleif/reg-pilot-filer:latest
container_name: reg-pilot-filer
hostname: reg-pilot-filer
ports:
Expand Down
5 changes: 4 additions & 1 deletion signify-ts-test/test/reg-pilot-api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -890,9 +890,12 @@ async function checkLogin(
) {
let heads = new Headers();
heads.set("Content-Type", "application/json");
const client: SignifyClient = user.roleClient;
let creq = { headers: heads, method: "GET", body: null };
let cpath = `/checklogin/${user.ecrAid.prefix}`;
const cresp = await fetch(env.apiBaseUrl + cpath, creq);
const url = env.apiBaseUrl + cpath;
let sreq = await client.createSignedRequest(user.idAlias, url, creq);
const cresp = await fetch(url, sreq);
let cbody = await cresp.json();
if (isEbaDataSubmitter(cred, user.ecrAid.prefix)) {
if (credRevoked) {
Expand Down

0 comments on commit 031b585

Please sign in to comment.