diff options
| author | Hafeez | 2018-03-07 11:17:48 +0000 |
|---|---|---|
| committer | Hafeez | 2018-03-07 11:17:48 +0000 |
| commit | 4e3627622af4c42f9427dc44aaf326ee012804b9 (patch) | |
| tree | 6fc771cd67db9976751d581013c05350925d91f0 /src | |
| parent | fixed merge conflict (diff) | |
| download | medicine-4e3627622af4c42f9427dc44aaf326ee012804b9.tar.gz medicine-4e3627622af4c42f9427dc44aaf326ee012804b9.zip | |
changed login endpoint to oauth
Diffstat (limited to 'src')
| -rw-r--r-- | src/app.ts | 2 | ||||
| -rw-r--r-- | src/auth.ts | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -38,7 +38,7 @@ class App { private middleware(): void { this.express.use(expressJwt({secret: 'Mr Secret'}) .unless({path: [ - '/cs3099group-be-4/login', + '/cs3099group-be-4/oauth/token', '/cs3099group-be-4/_supported_protocols_' ] }) ); diff --git a/src/auth.ts b/src/auth.ts index 5a1707c..1ecd1c5 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -101,7 +101,7 @@ export class AuthRouter { public init(): void { this.configStrategy(); - this.router.post('/login', this.checkErr, this.authenticate, this.genToken); + this.router.post('/oauth/token', this.checkErr, this.authenticate, this.genToken); this.router.get( '/logout', (req: Request, res: Response): void => { req.logout(); } |
