Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add authentication
Browse files Browse the repository at this point in the history
tkurki committed Dec 4, 2023
1 parent 1289633 commit 07b36e9
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/security.ts
Original file line number Diff line number Diff line change
@@ -191,6 +191,8 @@ export interface SecurityStrategy {
source: any,
path: string
) => boolean

addAdminMiddleware: (path: string) => void
}

export class InvalidTokenError extends Error {
3 changes: 3 additions & 0 deletions src/serverroutes.ts
Original file line number Diff line number Diff line change
@@ -837,6 +837,9 @@ module.exports = function (
}
)

app.securityStrategy.addAdminMiddleware(
`${SERVERROUTESPREFIX}/eventsRoutingData`
)
app.get(
`${SERVERROUTESPREFIX}/eventsRoutingData`,
(req: Request, res: Response) => {

0 comments on commit 07b36e9

Please sign in to comment.