Skip to content

Commit

Permalink
Adding Authentication to API (#12)
Browse files Browse the repository at this point in the history
Implemented initial developer auth + SAML flows for authentication, uses JWT for tokens

Co-authored-by: Michael Drewitt <[email protected]>
  • Loading branch information
2 people authored and jessehartloff committed Jun 30, 2021
1 parent 94f079d commit 1298d4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions @types/express/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { AccessToken, RefreshToken } from 'devu-shared-modules'
declare global {
namespace Express {
interface Request {
// Auth Data
currentUser?: AccessToken // Deserialized access token
refreshUser?: RefreshToken // Deserialized refresh token
user?: User
users?: User[]
userCourse?: UserCourse
Expand Down
3 changes: 3 additions & 0 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import swagger from '../utils/swagger.utils'

import login from './login.router'
import users from './users.router'
import status from './status.router'

import { isAuthorized } from '../middleware/auth.middleware'
import userCourse from './user-course.router'
import status from './status.router'

Expand Down

0 comments on commit 1298d4c

Please sign in to comment.