File

src/issuer/configuration/issuance/entities/issuance-config.entity.ts

Description

Entity to manage issuance configs

Index

Properties

Properties

Optional authServers
Type : string[]
Decorators :
@IsArray()
@IsOptional()
@Column({type: 'json', nullable: true})

Authentication server URL for the issuance process.

Optional batchSize
Type : number
Decorators :
@IsNumber()
@IsOptional()
@Column('int', {default: 1})

Value to determine the amount of credentials that are issued in a batch. Default is 1.

Optional chainedAs
Type : ChainedAsConfig
Decorators :
@ApiPropertyOptional({type: () => ChainedAsConfig})
@ValidateNested()
@Type(undefined)
@IsOptional()
@Column({type: 'json', nullable: true})

Configuration for Chained Authorization Server mode. When enabled, EUDIPLO acts as an OAuth AS facade, delegating user authentication to an upstream OIDC provider while issuing its own tokens with issuer_state.

createdAt
Type : Date
Decorators :
@CreateDateColumn()

The timestamp when the VP request was created.

display
Type : DisplayInfo[]
Decorators :
@ValidateNested({each: true})
@Type(undefined)
@Column('json', {nullable: true})
Optional dPopRequired
Type : boolean
Decorators :
@IsBoolean()
@IsOptional()
@Column('boolean', {default: true})

Indicates whether DPoP is required for the issuance process. Default value is true.

tenant
Type : TenantEntity
Decorators :
@ManyToOne(undefined, {cascade: true, onDelete: 'CASCADE'})

The tenant that owns this object.

tenantId
Type : string
Decorators :
@ApiHideProperty()
@PrimaryColumn()

Tenant ID for the issuance configuration.

updatedAt
Type : Date
Decorators :
@UpdateDateColumn()

The timestamp when the VP request was last updated.

Optional walletAttestationRequired
Type : boolean
Decorators :
@IsBoolean()
@IsOptional()
@Column('boolean', {default: false})

Indicates whether wallet attestation is required for the token endpoint. When enabled, wallets must provide OAuth-Client-Attestation headers. Default value is false.

Optional walletProviderTrustLists
Type : string[]
Decorators :
@IsArray()
@IsOptional()
@Column({type: 'json', nullable: true})

URLs of trust lists containing trusted wallet providers. The wallet attestation's X.509 certificate will be validated against these trust lists. If empty and walletAttestationRequired is true, all wallet providers are rejected.

import {
    ApiExtraModels,
    ApiHideProperty,
    ApiPropertyOptional,
} from "@nestjs/swagger";
import { Type } from "class-transformer";
import {
    IsArray,
    IsBoolean,
    IsNumber,
    IsOptional,
    ValidateNested,
} from "class-validator";
import {
    Column,
    CreateDateColumn,
    Entity,
    ManyToOne,
    PrimaryColumn,
    UpdateDateColumn,
} from "typeorm";
import { TenantEntity } from "../../../../auth/tenant/entitites/tenant.entity";
import {
    AuthenticationMethodAuth,
    AuthenticationMethodNone,
    AuthenticationMethodPresentation,
} from "../dto/authentication-config.dto";
import { ChainedAsConfig } from "../dto/chained-as-config.dto";
import { DisplayInfo } from "../dto/display.dto";

/**
 * Entity to manage issuance configs
 */
@ApiExtraModels(
    AuthenticationMethodNone,
    AuthenticationMethodAuth,
    AuthenticationMethodPresentation,
)
@Entity()
export class IssuanceConfig {
    /**
     * Tenant ID for the issuance configuration.
     */
    @ApiHideProperty()
    @PrimaryColumn()
    tenantId!: string;

    /**
     * The tenant that owns this object.
     */
    @ManyToOne(() => TenantEntity, { cascade: true, onDelete: "CASCADE" })
    tenant!: TenantEntity;

    /**
     * Authentication server URL for the issuance process.
     */
    @IsArray()
    @IsOptional()
    @Column({ type: "json", nullable: true })
    authServers?: string[];

    /**
     * Value to determine the amount of credentials that are issued in a batch.
     * Default is 1.
     */
    @IsNumber()
    @IsOptional()
    @Column("int", { default: 1 })
    batchSize?: number;

    /**
     * Indicates whether DPoP is required for the issuance process. Default value is true.
     */
    @IsBoolean()
    @IsOptional()
    @Column("boolean", { default: true })
    dPopRequired?: boolean;

    /**
     * Indicates whether wallet attestation is required for the token endpoint.
     * When enabled, wallets must provide OAuth-Client-Attestation headers.
     * Default value is false.
     */
    @IsBoolean()
    @IsOptional()
    @Column("boolean", { default: false })
    walletAttestationRequired?: boolean;

    /**
     * URLs of trust lists containing trusted wallet providers.
     * The wallet attestation's X.509 certificate will be validated against these trust lists.
     * If empty and walletAttestationRequired is true, all wallet providers are rejected.
     */
    @IsArray()
    @IsOptional()
    @Column({ type: "json", nullable: true })
    walletProviderTrustLists?: string[];

    /**
     * Configuration for Chained Authorization Server mode.
     * When enabled, EUDIPLO acts as an OAuth AS facade, delegating user authentication
     * to an upstream OIDC provider while issuing its own tokens with issuer_state.
     */
    @ApiPropertyOptional({ type: () => ChainedAsConfig })
    @ValidateNested()
    @Type(() => ChainedAsConfig)
    @IsOptional()
    @Column({ type: "json", nullable: true })
    chainedAs?: ChainedAsConfig;

    @ValidateNested({ each: true })
    @Type(() => DisplayInfo)
    @Column("json", { nullable: true })
    display!: DisplayInfo[];

    /**
     * The timestamp when the VP request was created.
     */
    @CreateDateColumn()
    createdAt!: Date;

    /**
     * The timestamp when the VP request was last updated.
     */
    @UpdateDateColumn()
    updatedAt!: Date;
}

results matching ""

    No results matching ""