chore: add sso service and logic

This commit is contained in:
mahyargdz
2025-04-21 10:41:43 +03:30
parent 41b0652c47
commit 160040a4b7
16 changed files with 619 additions and 9 deletions
@@ -0,0 +1,35 @@
import { ApiProperty } from "@nestjs/swagger";
import { IsArray, IsBoolean, IsOptional, IsString } from "class-validator";
export class UpdateSSOClientDTO {
@ApiProperty({ description: "Client name", example: "Danak Dashboard", required: false })
@IsString({ message: "Name must be a string" })
@IsOptional()
name?: string;
@ApiProperty({ description: "Client description", example: "Dashboard application for administrators", required: false })
@IsString({ message: "Description must be a string" })
@IsOptional()
description?: string;
@ApiProperty({ description: "Whether the client is active", example: true, required: false })
@IsBoolean({ message: "Is active must be a boolean" })
@IsOptional()
isActive?: boolean;
@ApiProperty({ description: "Whether the client requires a secret", example: false, required: false })
@IsBoolean({ message: "Requires secret must be a boolean" })
@IsOptional()
requiresSecret?: boolean;
@ApiProperty({
description: "List of allowed redirect URLs for this client",
example: ["https://dashboard.danak.co/auth/callback"],
type: [String],
required: false,
})
@IsArray({ message: "Allowed redirect URLs must be an array" })
@IsString({ each: true, message: "Each redirect URL must be a string" })
@IsOptional()
allowedRedirectUrls?: string[];
}