argos/dmp-frontend/src/app/core/model/auth/principal.ts

31 lines
698 B
TypeScript
Raw Normal View History

2023-10-11 16:53:12 +02:00
import { AppRole } from "@app/core/common/enum/app-role";
import { AppPermission } from "@app/core/common/enum/permission.enum";
2023-10-11 16:53:12 +02:00
import { Guid } from "@common/types/guid";
2019-01-18 18:03:45 +01:00
2023-10-11 16:53:12 +02:00
export interface AppAccount {
isAuthenticated: boolean;
// permissions: AppPermission[];
roles: AppRole[];
permissions: AppPermission[];
2023-10-11 16:53:12 +02:00
principal: AppPrincipalInfo;
profile: UserProfileInfo;
}
export interface AppPrincipalInfo{
subject: Guid;
2019-01-18 18:03:45 +01:00
name: string;
2023-10-11 16:53:12 +02:00
scope: string[];
client: string;
notBefore: Date;
authenticatedAt: Date;
2019-01-18 18:03:45 +01:00
expiresAt: Date;
2023-10-11 16:53:12 +02:00
more: Record<string, string[]>
}
export interface UserProfileInfo {
2019-01-18 18:03:45 +01:00
culture: string;
2023-10-11 16:53:12 +02:00
language: string;
timezone: string;
avatarUrl: string;
email: string;
2019-01-18 18:03:45 +01:00
}