web-service/apps/freeblox-web-service/src/services/auth/dtos/challenge-response.dto.ts

25 lines
569 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
import { AuthChallenge } from '../../../../../auth/src/enums/challenge.enum';
export class AuthResultResponse {
@ApiProperty()
token: string;
@ApiProperty()
refresh: string;
@ApiProperty()
expires_in: number;
}
export class ChallengeResponseDto {
@ApiProperty({ type: String, enum: AuthChallenge, nullable: true })
challenge: AuthChallenge;
@ApiProperty({ nullable: true })
challengeSecret: string;
@ApiProperty({ type: AuthResultResponse, nullable: true })
authResult: AuthResultResponse;
}