src/issuer/configuration/attribute-provider/entities/attribute-provider.entity.ts

Description

An Attribute Provider is an external HTTPS endpoint called during credential issuance to dynamically fetch claim values.

Attribute Providers are configured once per tenant and can be referenced by multiple credential configurations via attributeProviderId.

Index

Properties

Properties

auth
Type : WebHookAuthConfigNone | WebHookAuthConfigHeader
Decorators :
@ApiProperty({oneOf: undefined})
@Column('json')
Optional description
Type : string | null
Decorators :
@ApiPropertyOptional({description: 'Attribute provider description'})
@Column('varchar', {nullable: true})
id
Type : string
Decorators :
@PrimaryColumn('varchar')
name
Type : string
Decorators :
@ApiProperty({description: 'Attribute provider name'})
@Column('varchar')
tenant
Type : TenantEntity
Decorators :
@ManyToOne(undefined, {cascade: true, onDelete: 'CASCADE'})
tenantId
Type : string
Decorators :
@ApiProperty({description: 'Tenant identifier'})
@Column('varchar', {primary: true})
url
Type : string
Decorators :
@ApiProperty({description: 'Attribute provider URL'})
@Column('varchar')
import {
    ApiProperty,
    ApiPropertyOptional,
    getSchemaPath,
} from "@nestjs/swagger";
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
import { TenantEntity } from "../../../../auth/tenant/entities/tenant.entity";
import {
    WebHookAuthConfigHeader,
    WebHookAuthConfigNone,
} from "../../../../webhook/webhook.dto";

/**
 * An Attribute Provider is an external HTTPS endpoint called during
 * credential issuance to dynamically fetch claim values.
 *
 * Attribute Providers are configured once per tenant and can be
 * referenced by multiple credential configurations via `attributeProviderId`.
 */
@Entity()
export class AttributeProviderEntity {
    @PrimaryColumn("varchar")
    id!: string;

    @ApiProperty({ description: "Tenant identifier" })
    @Column("varchar", { primary: true })
    tenantId!: string;

    @ManyToOne(() => TenantEntity, { cascade: true, onDelete: "CASCADE" })
    tenant!: TenantEntity;

    @ApiProperty({ description: "Attribute provider name" })
    @Column("varchar")
    name!: string;

    @ApiPropertyOptional({ description: "Attribute provider description" })
    @Column("varchar", { nullable: true })
    description?: string | null;

    @ApiProperty({ description: "Attribute provider URL" })
    @Column("varchar")
    url!: string;

    @ApiProperty({
        oneOf: [
            { $ref: getSchemaPath(WebHookAuthConfigNone) },
            { $ref: getSchemaPath(WebHookAuthConfigHeader) },
        ],
    })
    @Column("json")
    auth!: WebHookAuthConfigNone | WebHookAuthConfigHeader;
}

results matching ""

    No results matching ""