-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Separate SIOPv2 REST API into individual functions and use expr…
…ess-support
- Loading branch information
Showing
12 changed files
with
359 additions
and
414 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.