mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 19:28:09 +00:00
fix: oci auth for go sdk (#4152)
This commit is contained in:
@@ -28,7 +28,17 @@ export const registerIdentityOciAuthRouter = async (server: FastifyZodProvider)
|
|||||||
.object({
|
.object({
|
||||||
authorization: z.string(),
|
authorization: z.string(),
|
||||||
host: z.string(),
|
host: z.string(),
|
||||||
"x-date": z.string()
|
"x-date": z.string().optional(),
|
||||||
|
date: z.string().optional()
|
||||||
|
})
|
||||||
|
.superRefine((val, ctx) => {
|
||||||
|
if (!val.date && !val["x-date"]) {
|
||||||
|
ctx.addIssue({
|
||||||
|
code: z.ZodIssueCode.custom,
|
||||||
|
message: "Either date or x-date must be provided",
|
||||||
|
path: ["headers", "date"]
|
||||||
|
});
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.describe(OCI_AUTH.LOGIN.headers)
|
.describe(OCI_AUTH.LOGIN.headers)
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ export type TLoginOciAuthDTO = {
|
|||||||
headers: {
|
headers: {
|
||||||
authorization: string;
|
authorization: string;
|
||||||
host: string;
|
host: string;
|
||||||
"x-date": string;
|
"x-date"?: string;
|
||||||
|
date?: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user