feat(backend): Generic authentication checks.
Added support for deciding based on any predicate about the current AuthenticationInfo whether or not a request will be accepted.
This commit is contained in:
parent
be667c7c53
commit
054e761baa
2 changed files with 71 additions and 18 deletions
11
backend/src/middleware/auth/authentication-info.ts
Normal file
11
backend/src/middleware/auth/authentication-info.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Object with information about the user who is currently logged in.
|
||||
*/
|
||||
export type AuthenticationInfo = {
|
||||
accountType: "student" | "teacher",
|
||||
username: string,
|
||||
name?: string,
|
||||
firstName?: string,
|
||||
lastName?: string,
|
||||
email?: string
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue