chore: add sso service and logic
This commit is contained in:
@@ -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[];
|
||||
}
|
||||
Reference in New Issue
Block a user