mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 15:28:42 +00:00
Restructure MIs to more generic Identity
This commit is contained in:
@@ -84,6 +84,99 @@ export const ResetPasswordV1 = z.object({
|
||||
})
|
||||
});
|
||||
|
||||
export const RenewAccessTokenV1 = z.object({
|
||||
body: z.object({
|
||||
accessToken: z.string().trim(),
|
||||
})
|
||||
});
|
||||
|
||||
export const LoginUniversalAuthV1 = z.object({
|
||||
body: z.object({
|
||||
clientId: z.string().trim(),
|
||||
clientSecret: z.string().trim()
|
||||
})
|
||||
});
|
||||
|
||||
export const AddUniversalAuthToIdentityV1 = z.object({
|
||||
params: z.object({
|
||||
identityId: z.string().trim()
|
||||
}),
|
||||
body: z.object({
|
||||
clientSecretTrustedIps: z
|
||||
.object({
|
||||
ipAddress: z.string().trim(),
|
||||
})
|
||||
.array()
|
||||
.min(1)
|
||||
.default([{ ipAddress: "0.0.0.0/0" }]),
|
||||
accessTokenTrustedIps: z
|
||||
.object({
|
||||
ipAddress: z.string().trim(),
|
||||
})
|
||||
.array()
|
||||
.min(1)
|
||||
.default([{ ipAddress: "0.0.0.0/0" }]),
|
||||
accessTokenTTL: z.number().int().min(0).default(7200),
|
||||
accessTokenMaxTTL: z.number().int().min(0).default(0),
|
||||
accessTokenNumUsesLimit: z.number().int().min(0).default(0)
|
||||
})
|
||||
});
|
||||
|
||||
export const UpdateUniversalAuthToIdentityV1 = z.object({
|
||||
params: z.object({
|
||||
identityId: z.string()
|
||||
}),
|
||||
body: z.object({
|
||||
clientSecretTrustedIps: z
|
||||
.object({
|
||||
ipAddress: z.string().trim()
|
||||
})
|
||||
.array()
|
||||
.min(1)
|
||||
.optional(),
|
||||
accessTokenTrustedIps: z
|
||||
.object({
|
||||
ipAddress: z.string().trim(),
|
||||
})
|
||||
.array()
|
||||
.min(1)
|
||||
.optional(),
|
||||
accessTokenTTL: z.number().int().min(0).optional(),
|
||||
accessTokenNumUsesLimit: z.number().int().min(0).optional(),
|
||||
accessTokenMaxTTL: z.number().int().min(0).default(0),
|
||||
}),
|
||||
});
|
||||
|
||||
export const GetUniversalAuthForIdentityV1 = z.object({
|
||||
params: z.object({
|
||||
identityId: z.string().trim()
|
||||
})
|
||||
});
|
||||
|
||||
export const CreateUniversalAuthClientSecretV1 = z.object({
|
||||
params: z.object({
|
||||
identityId: z.string()
|
||||
}),
|
||||
body: z.object({
|
||||
description: z.string().trim().default(""),
|
||||
numUsesLimit: z.number().min(0).default(0),
|
||||
ttl: z.number().min(0).default(0),
|
||||
}),
|
||||
});
|
||||
|
||||
export const GetUniversalAuthClientSecretsV1 = z.object({
|
||||
params: z.object({
|
||||
identityId: z.string()
|
||||
})
|
||||
});
|
||||
|
||||
export const RevokeUniversalAuthClientSecretV1 = z.object({
|
||||
params: z.object({
|
||||
identityId: z.string(),
|
||||
clientSecretId: z.string()
|
||||
})
|
||||
});
|
||||
|
||||
export const VerifyMfaTokenV2 = z.object({
|
||||
body: z.object({
|
||||
mfaToken: z.string().trim()
|
||||
|
||||
Reference in New Issue
Block a user