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

32 lines
681 B
TypeScript

import { AppRole } from "@app/core/common/enum/app-role";
import { AppPermission } from "@app/core/common/enum/permission.enum";
import { Guid } from "@common/types/guid";
export interface AppAccount {
isAuthenticated: boolean;
roles: AppRole[];
permissions: AppPermission[];
principal: AppPrincipalInfo;
profile: UserProfileInfo;
}
export interface AppPrincipalInfo {
subject: Guid;
name: string;
scope: string[];
client: string;
notBefore: Date;
authenticatedAt: Date;
expiresAt: Date;
userId: Guid;
more: Record<string, string[]>
}
export interface UserProfileInfo {
culture: string;
language: string;
timezone: string;
avatarUrl: string;
email: string;
}