Short-lived OAuth authorization code exchanged for tokens. The code is stored as a hash. Actor info is kept to recreate the session on exchange.
class McpAuthorizationCode extends VendureEntity { constructor(input?: DeepPartial<McpAuthorizationCode>) @Index({ unique: true }) @Column() code: string; @Index() @ManyToOne(() => McpOauthClient, { onDelete: 'CASCADE' }) oauthClient: McpOauthClient; @EntityId() oauthClientId: ID; @EntityId() actorId: ID; @Column({ type: 'varchar' }) actorType: McpGrantUserType; @Column() redirectUri: string; @Column() resource: string; @EntityId({ nullable: true }) channelId: ID | null; @Column() codeChallenge: string; @Index() @Column({ type: Date }) expiresAt: Date;}VendureEntitystringHash of the authorization code. The raw code is never stored and is deleted after use.
McpOauthClientIDIDMcpGrantUserTypestringstringTarget endpoint (issuer + /mcp/admin or /mcp/shop).
Must match during token exchange.
ID | nullstringDate