src/verifier/presentations/dto/auth-response.dto.ts

Description

AuthResponse DTO

Extends

createZodDto(AuthResponseSchema)

Relationships

Used by

No results matching.

Index

Properties

Properties

Optional exp
Type : number

The expiration timestamp (optional).

Optional iat
Type : number

The issued at timestamp (optional).

Optional state
Type : string

The state parameter to maintain state between the request and callback.

vp_token
Type : { }

The VP token containing the presentation data.

import { createZodDto } from "nestjs-zod";
import { z } from "zod";

export const AuthResponseSchema = z
    .object({
        vp_token: z.record(z.string(), z.array(z.string())),
        state: z.string().optional(),
        iat: z.number().optional(),
        exp: z.number().optional(),
    })
    .strict();

/**
 * AuthResponse DTO
 */
export class AuthResponse extends createZodDto(AuthResponseSchema) {
    /**
     * The VP token containing the presentation data.
     */
    vp_token!: {
        /**
         * Key-value pairs representing the VP token data.
         */
        [key: string]: string[];
    };
    /**
     * The state parameter to maintain state between the request and callback.
     */
    state?: string;

    /**
     * The issued at timestamp (optional).
     */
    iat?: number;

    /**
     * The expiration timestamp (optional).
     */
    exp?: number;
}

results matching ""

    No results matching ""