feat(#1): Add permission and role model
This commit is contained in:
2
legalconsenthub/types/auth.d.ts
vendored
2
legalconsenthub/types/auth.d.ts
vendored
@@ -3,11 +3,13 @@ declare module '#auth-utils' {
|
||||
keycloakId: string
|
||||
name: string
|
||||
organizations: Organization[]
|
||||
roles: string[]
|
||||
}
|
||||
|
||||
interface UserSession {
|
||||
name: string
|
||||
organizations: Organization[]
|
||||
roles: string[]
|
||||
loggedInAt: number
|
||||
jwt: {
|
||||
accessToken: string
|
||||
|
||||
@@ -5,6 +5,11 @@ export interface KeycloakTokenPayload {
|
||||
family_name?: string
|
||||
email?: string
|
||||
organization?: Record<string, { id?: string }>
|
||||
resource_access?: {
|
||||
legalconsenthub?: {
|
||||
roles?: string[]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface Organization {
|
||||
|
||||
Reference in New Issue
Block a user