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 Jul 19, 2021
1 parent 80a1685 commit 338e48a
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 @@ -7,6 +7,9 @@ import assignments from './assignments.router'
import courses from './courses.router'
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 logout from './logout.router'
import status from './status.router'
Expand Down

0 comments on commit 338e48a

Please sign in to comment.