feat: add routes and config opts for more complete stubs
This commit is contained in:
@@ -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' );
|
||||
} );
|
||||
};
|
||||
Reference in New Issue
Block a user