forked from eclipse-sw360/sw360-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nextauth.d.ts
44 lines (37 loc) · 1.05 KB
/
nextauth.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) Helio Chissini de Castro, 2023. Part of the SW360 Frontend Project.
// Copyright (C) Siemens AG, 2023. Part of the SW360 Frontend Project.
// This program and the accompanying materials are made
// available under the terms of the Eclipse Public License 2.0
// which is available at https://www.eclipse.org/legal/epl-2.0/
// SPDX-License-Identifier: EPL-2.0
// License-Filename: LICENSE
import 'next-auth'
enum UserGroupType {
USER = 'USER',
ADMIN = 'ADMIN',
CLEARING_ADMIN = 'CLEARING_ADMIN',
ECC_ADMIN = 'ECC_ADMIN',
SECURITY_ADMIN = 'SECURITY_ADMIN',
SW360_ADMIN = 'SW360_ADMIN',
CLEARING_EXPERT = 'CLEARING_EXPERT',
}
interface SW360User extends DefaultUser {
access_token: string
exp: number
expires_in: number
iat: number
jti: string
refresh_token: string
scope: string
token_type: string
userGroup: UserGroupType
}
declare module 'next-auth' {
type User = SW360User
interface Session {
user?: User
}
}
declare module 'next-auth/jwt' {
type JWT = SW360User
}