Skip to content

Commit

Permalink
feat: Separate SIOPv2 REST API into individual functions and use expr…
Browse files Browse the repository at this point in the history
…ess-support
  • Loading branch information
nklomp committed Aug 3, 2023
1 parent 4e7d6e1 commit 2495980
Show file tree
Hide file tree
Showing 12 changed files with 359 additions and 414 deletions.
18 changes: 4 additions & 14 deletions packages/siopv2-oid4vp-rp-rest-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,17 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

**Note:** Version bump only for package @sphereon/ssi-sdk.siopv2-oid4vp-rp-rest-api





# [0.14.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.13.0...v0.14.0) (2023-07-30)


### Bug Fixes

* Fix relative DID resolution and Json websignature 2020 verification for ED25519 and some other algs ([ca2682c](https://github.com/Sphereon-Opensource/SSI-SDK/commit/ca2682c0b747f5052143c943a06f23acc7aa22cc))
* Use agent resolver if not set, with fallback to universal resolver. Fix bug in response message ([43c9313](https://github.com/Sphereon-Opensource/SSI-SDK/commit/43c9313ee623fa0848dca8dcd4e2e509692c28d7))
* VP did resolution from agent ([aa3f3f1](https://github.com/Sphereon-Opensource/SSI-SDK/commit/aa3f3f1173f502c5414a2237231306311ed4d1fc))

- Fix relative DID resolution and Json websignature 2020 verification for ED25519 and some other algs ([ca2682c](https://github.com/Sphereon-Opensource/SSI-SDK/commit/ca2682c0b747f5052143c943a06f23acc7aa22cc))
- Use agent resolver if not set, with fallback to universal resolver. Fix bug in response message ([43c9313](https://github.com/Sphereon-Opensource/SSI-SDK/commit/43c9313ee623fa0848dca8dcd4e2e509692c28d7))
- VP did resolution from agent ([aa3f3f1](https://github.com/Sphereon-Opensource/SSI-SDK/commit/aa3f3f1173f502c5414a2237231306311ed4d1fc))

### Features

* Add global web resolution provider. Add json error handler ([f19d1d1](https://github.com/Sphereon-Opensource/SSI-SDK/commit/f19d1d135a9944a6c9e4c6040c58e7563c4442f2))




- Add global web resolution provider. Add json error handler ([f19d1d1](https://github.com/Sphereon-Opensource/SSI-SDK/commit/f19d1d135a9944a6c9e4c6040c58e7563c4442f2))

# [0.13.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.12.0...v0.13.0) (2023-06-24)

Expand Down
22 changes: 16 additions & 6 deletions packages/siopv2-oid4vp-rp-rest-api/__tests__/RestAPI.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
import { ExpressBuilder } from '@sphereon/ssi-sdk.express-support'
import agent from './agent'
import { ISIOPv2RPRestAPIOpts, SIOPv2RPRestAPI } from '../src'
import { ISIOPv2RPRestAPIOpts, SIOPv2RPApiServer } from '../src'
import morgan from 'morgan'

const opts: ISIOPv2RPRestAPIOpts = {
hostname: '0.0.0.0',
port: 5000,
webappBaseURI: 'http://192.168.2.18:5000',
siopBaseURI: 'http://192.168.2.18:5000',
webappCreateAuthRequest: {
webappBaseURI: 'http://192.168.2.18:5000',
siopBaseURI: 'http://192.168.2.18:5000',
},
}
const builder = ExpressBuilder.fromServerOpts({
port: 5000,
hostname: '0.0.0.0',
}).withPassportAuth(false)
// .withSessionOptions({secret: '1234', name: 'oidc-session'})
// .addHandler(morgan('dev'))
const expressArgs = builder.build({ startListening: true })
expressArgs.express.use(morgan('dev'))

new SIOPv2RPRestAPI({ agent, opts })
new SIOPv2RPApiServer({ agent, expressArgs, opts })
Binary file not shown.
10 changes: 7 additions & 3 deletions packages/siopv2-oid4vp-rp-rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"start:dev": "ts-node __tests__/RestAPI.ts"
},
"dependencies": {
"@sphereon/did-auth-siop": "0.3.2-unstable.6",
"@sphereon/did-auth-siop": "0.3.2-unstable.8",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/ssi-sdk.express-support": "workspace:*",
"@sphereon/ssi-sdk.kv-store-temp": "workspace:*",
"@sphereon/ssi-sdk.presentation-exchange": "workspace:*",
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "workspace:*",
Expand All @@ -30,10 +32,12 @@
"uuid": "^8.3.2"
},
"devDependencies": {
"morgan": "^1.10.0",
"@types/morgan": "^1.9.4",
"@decentralized-identity/ion-sdk": "^0.6.0",
"@sphereon/did-uni-client": "^0.6.0",
"@sphereon/pex": "^2.0.1",
"@sphereon/pex-models": "^2.0.2",
"@sphereon/pex": "2.1.0",
"@sphereon/pex-models": "^2.0.3",
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.13.0",
"@sphereon/ssi-sdk.data-store": "workspace:*",
"@sphereon/ssi-sdk.vc-handler-ld-local": "workspace:*",
Expand Down
Loading

0 comments on commit 2495980

Please sign in to comment.