0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

chore(console): update the default user context as well

This commit is contained in:
Darcy Ye 2024-03-28 11:31:39 +08:00
parent e0123fd415
commit 18041a6ccc
No known key found for this signature in database
GPG key ID: B46F4C07EDEFC610

View file

@ -1,4 +1,8 @@
import { type AccessTokenPayload, type ClientCredentialsPayload } from '@logto/schemas';
import type {
AccessTokenPayload,
ClientCredentialsPayload,
JwtCustomizerUserContext,
} from '@logto/schemas';
import { type EditorProps } from '@monaco-editor/react';
import TokenFileIcon from '@/assets/icons/token-file-icon.svg';
@ -203,17 +207,26 @@ export const defaultClientCredentialsPayload: ClientCredentialsPayload = {
kind: 'ClientCredentials',
};
const defaultUserContext: Partial<JwtCustomizerUserContext> = {
id: '123',
primaryEmail: 'foo@logto.io',
primaryPhone: '+1234567890',
username: 'foo',
name: 'Foo Bar',
avatar: 'https://example.com/avatar.png',
applicationId: 'my-app',
profile: {},
identities: {},
customData: {},
ssoIdentities: [],
mfaVerificationFactors: [],
roles: [],
organizations: [],
organizationRoles: [],
};
export const defaultUserTokenContextData = {
user: {
id: '123',
primaryEmail: 'foo@logto.io',
primaryPhone: '+1234567890',
username: 'foo',
name: 'Foo Bar',
avatar: 'https://example.com/avatar.png',
identities: {},
customData: {},
},
user: defaultUserContext,
};
export const accessTokenPayloadTestModel: ModelSettings = {