Skip to content

Commit

Permalink
use selv.local, replace postman with httpyac
Browse files Browse the repository at this point in the history
  • Loading branch information
eike-hass committed Apr 26, 2024
1 parent e5a0f3c commit 343a9ab
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 65 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# API
- Postman collection in `./tooling`

https://httpyac.github.io/guide/installation_vscode.html

`docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build`

Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
ISSUERS_BANK_FRAGMENT: S3zEW4inNy8FYZEMVTEthdzqqSBq1WglM2k75xKHzy0
labels:
traefik.enable: true
traefik.http.routers.backend.rule: Host(`backend.localhost`)
traefik.http.routers.backend.rule: Host(`backend.selv.local`)
traefik.http.routers.backend.entrypoints: web
traefik.http.routers.backend.service: backend
traefik.http.services.backend.loadbalancer.server.port: "3000"
Expand All @@ -63,7 +63,7 @@ services:
- ./proto:/usr/proto
labels:
traefik.enable: true
traefik.http.routers.oid4vc-tanglelabs.rule: Host(`bank.localhost`)
traefik.http.routers.oid4vc-tanglelabs.rule: Host(`bank.selv.local`)
traefik.http.routers.oid4vc-tanglelabs.entrypoints: web
traefik.http.routers.oid4vc-tanglelabs.service: oid4vc-tanglelabs
traefik.http.services.oid4vc-tanglelabs.loadbalancer.server.port: "3333"
Expand All @@ -78,7 +78,7 @@ services:
- ./proto:/usr/proto
labels:
traefik.enable: true
traefik.http.routers.oid4vc-waltid.rule: Host(`government.localhost`)
traefik.http.routers.oid4vc-waltid.rule: Host(`government.selv.local`)
traefik.http.routers.oid4vc-waltid.entrypoints: web
traefik.http.routers.oid4vc-waltid.service: oid4vc-waltid
traefik.http.services.oid4vc-waltid.loadbalancer.server.port: "3000"
Expand All @@ -91,7 +91,7 @@ services:
- ./proto:/usr/proto
labels:
traefik.enable: true
traefik.http.routers.oid4vc-impierce.rule: Host(`insurance.localhost`)
traefik.http.routers.oid4vc-impierce.rule: Host(`insurance.selv.local`)
traefik.http.routers.oid4vc-impierce.entrypoints: web
traefik.http.routers.oid4vc-impierce.service: oid4vc-impierce
traefik.http.services.oid4vc-impierce.loadbalancer.server.port: "3033"
Expand Down
Empty file added tooling/API/Backend/GRPC.http
Empty file.
50 changes: 50 additions & 0 deletions tooling/API/Identity/GRPC.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
proto < ../../../proto/identity/credentials.proto
proto < ../../../proto/identity/utils.proto

@host=http://selv.local:5001/identity
###
{{
//pre request script
const issuer = "did:iota:snd:0x2cfb60f00089a91a96fa8fcee5e2bda15f51b0b062762ad9ca846bba536f8818";
const credential = {
"@context":[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
],
type: ["VerifiableCredential","UniversityDegreeCredential"],
issuanceDate:"2017-10-22T12:23:48Z",
issuer,
credentialSubject:{
id:"did:iota:snd:0xce05da2c7e3fd32e89b4fcaf77bb3101d89be60ba6276cba80bd3ec2bd0603f6",
degree:{
type:"BachelorDegree",
name:"Bachelor of Science and Arts",
}
},
}

exports.credential_json = JSON.stringify(credential);
}}

GRPC /Jwt/create
{
"credential_json": {{credential_json}},
"issuer_fragment": "S3zEW4inNy8FYZEMVTEthdzqqSBq1WglM2k75xKHzy0"
}

###

{{
//pre request script
exports.data = new TextEncoder().encode("test");
}}

GRPC /Signing/sign
{
"data": {{data}},
"keyId": "pK0JAYw5RFFKqorBn0x4w98zl2UBfRys"
}

GRPC 0 - OK
content-type: application/grpc
date: Fri, 26 Apr 2024 08:30:11 GMT
26 changes: 26 additions & 0 deletions tooling/API/OID4VC/GRPC.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
proto < ../../../proto/oid4vc/siopv2.proto
proto < ../../../proto/oid4vc/oid4vp.proto
proto < ../../../proto/oid4vc/oid4vci.proto

@host=http://selv.local:5001/oid4vc-tanglelabs
###
GRPC /SIOPV2/CreateRequest
{
"state": "test"
}
###
GRPC 0 - OK
content-type: application/grpc+proto
date: Thu, 25 Apr 2024 19:42:51 GMT
###
GRPC /OID4VP/CreateRequest
{
"state": "test",
"presentationDefinition": {
"test": "test"
}
}
###
GRPC 0 - OK
content-type: application/grpc+proto
date: Thu, 25 Apr 2024 19:43:57 GMT
5 changes: 5 additions & 0 deletions tooling/API/OID4VC/HTTP.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@host=http://bank.host.docker.internal:81
###
GET /api/health
###
POST /api/auth
60 changes: 0 additions & 60 deletions tooling/Selv.postman_collection.json

This file was deleted.

0 comments on commit 343a9ab

Please sign in to comment.