add tenancy OCID requirement

This commit is contained in:
x032205
2025-05-09 22:33:02 -04:00
parent 578a0d7d93
commit 5742fc648b
12 changed files with 59 additions and 1 deletions
@@ -461,6 +461,7 @@ export const useAddIdentityOciAuth = () => {
return useMutation<IdentityOciAuth, object, AddIdentityOciAuthDTO>({
mutationFn: async ({
identityId,
tenancyOcid,
allowedUsernames,
accessTokenTTL,
accessTokenMaxTTL,
@@ -472,6 +473,7 @@ export const useAddIdentityOciAuth = () => {
} = await apiRequest.post<{ identityOciAuth: IdentityOciAuth }>(
`/api/v1/auth/oci-auth/identities/${identityId}`,
{
tenancyOcid,
allowedUsernames,
accessTokenTTL,
accessTokenMaxTTL,
@@ -497,6 +499,7 @@ export const useUpdateIdentityOciAuth = () => {
return useMutation<IdentityOciAuth, object, UpdateIdentityOciAuthDTO>({
mutationFn: async ({
identityId,
tenancyOcid,
allowedUsernames,
accessTokenTTL,
accessTokenMaxTTL,
@@ -508,6 +511,7 @@ export const useUpdateIdentityOciAuth = () => {
} = await apiRequest.patch<{ identityOciAuth: IdentityOciAuth }>(
`/api/v1/auth/oci-auth/identities/${identityId}`,
{
tenancyOcid,
allowedUsernames,
accessTokenTTL,
accessTokenMaxTTL,
@@ -293,6 +293,7 @@ export type DeleteIdentityAwsAuthDTO = {
export type IdentityOciAuth = {
identityId: string;
type: "iam";
tenancyOcid: string;
allowedUsernames: string;
accessTokenTTL: number;
accessTokenMaxTTL: number;
@@ -303,6 +304,7 @@ export type IdentityOciAuth = {
export type AddIdentityOciAuthDTO = {
organizationId: string;
identityId: string;
tenancyOcid: string;
allowedUsernames: string;
accessTokenTTL: number;
accessTokenMaxTTL: number;
@@ -315,6 +317,7 @@ export type AddIdentityOciAuthDTO = {
export type UpdateIdentityOciAuthDTO = {
organizationId: string;
identityId: string;
tenancyOcid?: string;
allowedUsernames?: string;
accessTokenTTL?: number;
accessTokenMaxTTL?: number;