feat: add routes and config opts for more complete stubs

This commit is contained in:
2026-09-04 11:22:43 +02:00
parent 97d68ca8b1
commit c32569317a
6 changed files with 881 additions and 1189 deletions
+26
View File
@@ -0,0 +1,26 @@
import {
SDKConfig
} from './config';
import express from 'express';
export const routes = ( app: express.Application, configuration: SDKConfig ) => {
app.get( '/jhid/v2/verify/full/sdk', ( _request: express.Request, response: express.Response ) => {
response.send( 'ok' );
} );
app.get( '/jhid/v2/verify/simple', ( _request: express.Request, response: express.Response ) => {
response.send( 'ok' );
} );
app.get( '/jhid/v2/login', ( _request: express.Request, response: express.Response ) => {
response.redirect( ( configuration.frontendURL ?? '' ) + ( configuration.defaultRedirectURL ?? '/account' ) );
} );
app.get( '/jhid/v2/logout', ( _request: express.Request, response: express.Response ) => {
response.redirect( configuration.frontendURL ?? '/' );
} );
app.get( '/jhid/v2/check/cors', ( request: express.Request, response: express.Response ) => {
response.send( 'ok' );
} );
};