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:
parent
e0123fd415
commit
18041a6ccc
1 changed files with 24 additions and 11 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue