Skip to content

Commit

Permalink
[feat] introduce new remote user store impl - address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JayaShakthi97 committed Nov 28, 2024
1 parent 9c343ec commit 4504f3e
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
4 changes: 2 additions & 2 deletions features/admin.remote-userstores.v1/api/remote-user-stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { RequestConfigInterface } from "@wso2is/admin.core.v1/hooks/use-request"
import { RemoteUserStoreManagerType } from "@wso2is/admin.userstores.v1/constants";
import { HttpMethods } from "@wso2is/core/models";
import { AxiosError, AxiosResponse } from "axios";
import { GenerateTokenResponseInterface, RegenerateTokenPayloadInterface } from "../models/remote-user-stores";
import { GenerateTokenResponseInterface, RegenerateTokenRequestPayloadInterface } from "../models/remote-user-stores";

/**
* The error code that is returned when there is no item in the list.
Expand Down Expand Up @@ -172,7 +172,7 @@ export const regenerateToken = (
? `${store.getState().config.endpoints.remoteUserStoreAgentToken}/${userStoreId}/regenerate`
: `${ store.getState().config.endpoints.onPremUserStoreAgentToken }/regenerate`;

const payload: RegenerateTokenPayloadInterface = userStoreManager ===
const payload: RegenerateTokenRequestPayloadInterface = userStoreManager ===
RemoteUserStoreManagerType.RemoteUserStoreManager
? { existingTokenId }
: { existingTokenId, userStoreId };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface AgentConnectionInterface {
}
}

export interface RegenerateTokenPayloadInterface {
export interface RegenerateTokenRequestPayloadInterface {
existingTokenId: string;
userStoreId?: string;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/**
* Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

.remote-user-store-create-page-layout {
.remote-user-store-impl-message {
a:hover {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
* under the License.
*/

import { Typography } from "@mui/material";
import Button from "@oxygen-ui/react/Button";
import Skeleton from "@oxygen-ui/react/Skeleton";
import Stack from "@oxygen-ui/react/Stack";
import Step from "@oxygen-ui/react/Step";
import StepContent from "@oxygen-ui/react/StepContent";
import StepLabel from "@oxygen-ui/react/StepLabel";
import Stepper from "@oxygen-ui/react/Stepper";
import Typography from "@oxygen-ui/react/Typography";
import { FeatureAccessConfigInterface, useRequiredScopes } from "@wso2is/access-control";
import { ClaimManagementConstants } from "@wso2is/admin.claims.v1/constants";
import { AppConstants, AppState, history } from "@wso2is/admin.core.v1";
Expand Down Expand Up @@ -81,7 +81,7 @@ type RemoteCustomerUserStoreCreatePageInterface = IdentifiableComponentInterface
*
* @returns the remote customer user store creation page
*/
const RemoteCustomerUserStoreCreatePage: FunctionComponent<RemoteCustomerUserStoreCreatePageInterface> = (
const RemoteUserStoreCreatePage: FunctionComponent<RemoteCustomerUserStoreCreatePageInterface> = (
props: RemoteCustomerUserStoreCreatePageInterface
): ReactElement => {
const { location, ["data-componentid"]: testId = "remote-userstore-create-page" } = props;
Expand Down Expand Up @@ -547,4 +547,4 @@ const RemoteCustomerUserStoreCreatePage: FunctionComponent<RemoteCustomerUserSto
);
};

export default RemoteCustomerUserStoreCreatePage;
export default RemoteUserStoreCreatePage;
2 changes: 1 addition & 1 deletion features/admin.remote-userstores.v1/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
* under the License.
*/

export { default as RemoteCustomerUserStoreCreatePage } from "./pages/remote-user-store-create-page";
export { default as RemoteUserStoreCreatePage } from "./pages/remote-user-store-create-page";
export { default as RemoteUserStoreEditPage } from "./pages/remote-user-store-edit-page";
export { default as RemoteUserStoresPage } from "./pages/remote-user-stores-page";

0 comments on commit 4504f3e

Please sign in to comment.