diff --git a/packages/core/.eslintrc.cjs b/packages/core/.eslintrc.cjs index 38e0ff9b..3a1c39e7 100644 --- a/packages/core/.eslintrc.cjs +++ b/packages/core/.eslintrc.cjs @@ -1,5 +1,5 @@ /** - * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. + * 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 diff --git a/packages/core/package.json b/packages/core/package.json index 698f6f5f..db1073f6 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -32,13 +32,18 @@ }, "devDependencies": { "@types/node": "^20.12.7", - "@wso2/eslint-plugin": "https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?5bf60cabe9e9a2571e8b1dd16d0c3bdc76db2c4f", - "@wso2/prettier-config": "https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/prettier-config?5bf60cabe9e9a2571e8b1dd16d0c3bdc76db2c4f", + "@wso2/eslint-plugin": "https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?fa0b844715320a3953d6d055997c0770f8695082", + "@wso2/prettier-config": "https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/prettier-config?fa0b844715320a3953d6d055997c0770f8695082", "eslint": "~8.57.0", "prettier": "^3.2.5", + "tslib": "^2.6.2", "typescript": "^5.4.5" }, "publishConfig": { "access": "public" + }, + "dependencies": { + "@asgardeo/auth-js": "^5.0.1", + "@asgardeo/js-ui-core": "link:" } } diff --git a/packages/core/prettier.config.cjs b/packages/core/prettier.config.cjs index 0f461af9..c07f730d 100644 --- a/packages/core/prettier.config.cjs +++ b/packages/core/prettier.config.cjs @@ -1,5 +1,5 @@ /** - * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. + * 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 diff --git a/packages/core/src/api/authenticate.ts b/packages/core/src/api/authenticate.ts new file mode 100644 index 00000000..c43a973e --- /dev/null +++ b/packages/core/src/api/authenticate.ts @@ -0,0 +1,70 @@ +/** + * 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. + */ + +import {AuthClient} from 'src/auth-client'; +import {AuthApiRequestBody} from 'src/models/auth-api-request'; +import AsgardeoUIException from '../exception'; +import {AuthApiResponse} from '../models/auth-api-response'; + +/** + * Send an authentication request to the authentication API. + * + * @param {AuthApiRequestBody} props - The authentication request body. + * @returns {Promise} A promise that resolves with the authentication API response. + */ +const authenticate = async (props: AuthApiRequestBody): Promise => { + let authnRequest: Request; + let response: Response; + + try { + const formBody: string = JSON.stringify(props); + + const headers: Headers = new Headers(); + headers.append('Content-Type', 'application/json'); + + const requestOptions: RequestInit = { + body: formBody, + headers, + method: 'POST', + }; + + /* Getting baseURL from authClient's data layer */ + const {baseUrl} = await AuthClient.getInstance().getDataLayer().getConfigData(); + + authnRequest = new Request(`${baseUrl}/oauth2/authn`, requestOptions); + } catch (error) { + throw new AsgardeoUIException('JS_UI_CORE-AUTHN-A-NF', 'Authentication request building failed', error.stack); + } + + try { + response = await fetch(authnRequest); + } catch (error) { + throw new AsgardeoUIException('JS_UI_CORE-AUTHN-A-NE', `Authentication API call Failed: ${error}`, error.stack); + } + + if (response.ok) { + return (await response.json()) as AuthApiResponse; + } + + throw new AsgardeoUIException( + 'JS_UI_CORE-AUTHN-AN-HE', + 'Failed to receive a successful response from the authentication endpoint', + ); +}; + +export default authenticate; diff --git a/packages/core/src/api/authorize.ts b/packages/core/src/api/authorize.ts new file mode 100644 index 00000000..2e7c2267 --- /dev/null +++ b/packages/core/src/api/authorize.ts @@ -0,0 +1,77 @@ +/** + * 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. + */ + +import {UIAuthClient} from 'src/models/auth-config'; +import {AuthClient} from '../auth-client'; +import AsgardeoUIException from '../exception'; +import {AuthApiResponse} from '../models/auth-api-response'; + +/** + * This function is used to authorize the user. + * @returns {Promise} A promise that resolves with the authorization response. + */ +const authorize = async (): Promise => { + let response: Response; + let requestOptions: RequestInit; + let authzURL: string; + + try { + const authInstace: UIAuthClient = AuthClient.getInstance(); + const params: Map = await authInstace.getAuthorizationURLParams(); + + const formBody: URLSearchParams = new URLSearchParams(); + + Array.from(params.entries()).forEach(([key, value]: [string, string]) => { + formBody.append(key, value); + }); + + /* Save the state temporarily in the data layer, this needs to be passed when token is requested */ + await authInstace.getDataLayer().setTemporaryDataParameter('state', params.get('state')); + + const headers: Headers = new Headers(); + headers.append('Accept', 'application/json'); + headers.append('Content-Type', 'application/x-www-form-urlencoded'); + + requestOptions = { + body: formBody.toString(), + headers, + method: 'POST', + }; + + authzURL = (await authInstace.getOIDCServiceEndpoints()).authorizationEndpoint; + } catch (error) { + throw new AsgardeoUIException('JS_UI_CORE-AUTHZ-A-NF', 'Authorization request building failed', error.stack); + } + + try { + response = await fetch(authzURL, requestOptions); + } catch (error) { + throw new AsgardeoUIException('JS_UI_CORE-AUTHZ-A-NE', 'Authorization API call failed', error.stack); + } + + if (response.ok) { + return (await response.json()) as AuthApiResponse; + } + + throw new AsgardeoUIException( + 'UI_CORE-AUTHZ-A-HE', + 'Failed to receive a successful response from the authorization server', + ); +}; + +export default authorize; diff --git a/packages/core/src/auth-client.ts b/packages/core/src/auth-client.ts new file mode 100644 index 00000000..7a477405 --- /dev/null +++ b/packages/core/src/auth-client.ts @@ -0,0 +1,55 @@ +/** + * 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. + */ + +import {AsgardeoAuthClient, Store, CryptoUtils} from '@asgardeo/auth-js'; +import {UIAuthClient, UIAuthConfig} from './models/auth-config'; + +/** + * The `AuthClient` class is a singleton class that provides an instance of the `UIAuthClient`. + */ +export class AuthClient { + private static instance: UIAuthClient; + + /** + * Private constructor to prevent direct object creation. + * This is necessary because this is a singleton class. + * @private + */ + // eslint-disable-next-line @typescript-eslint/no-empty-function + private constructor() {} + + /** + * Returns the singleton instance of `UIAuthClient`. If the instance does not exist, it is created. + * + * @param {UIAuthConfig} authClientConfig - The configuration for the `UIAuthClient`. + * @param {Store} store - The store for the `UIAuthClient`. + * @param {CryptoUtils} cryptoUtils - The crypto utilities for the `UIAuthClient`. + * @returns {UIAuthClient} The singleton instance of `UIAuthClient`. + */ + static getInstance(authClientConfig?: UIAuthConfig, store?: Store, cryptoUtils?: CryptoUtils): UIAuthClient { + if (!AuthClient.instance) { + AuthClient.instance = new AsgardeoAuthClient(); + AuthClient.instance.initialize(authClientConfig, store, cryptoUtils); + } + + return AuthClient.instance; + } +} + +/* Interfaces, classes and enums required from the auth-js package */ +export {CryptoUtils, JWKInterface, Store, AsgardeoAuthClient, TokenResponse, ResponseMode} from '@asgardeo/auth-js'; diff --git a/packages/core/src/exception.ts b/packages/core/src/exception.ts new file mode 100644 index 00000000..d8695d56 --- /dev/null +++ b/packages/core/src/exception.ts @@ -0,0 +1,55 @@ +/** + * 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. + */ + +/** + * `AsgardeoUIException` is a custom error class that extends the built-in `Error` class. + * + * @extends {Error} + */ +export default class AsgardeoUIException extends Error { + /** + * The name of the error, which is set to the name of the constructor. + * @override + */ + public override name: string; + + /** + * The stack trace of the error. + * @override + */ + public override stack: string; + + /** + * The code of the error. + */ + public code: string; + + /** + * Constructs a new `AsgardeoUIException`. + * + * @param {string} code - The error code. + * @param {string} message - The error message. + * @param {string} [stack] - The error stack trace. + */ + constructor(code: string, message: string, stack?: string) { + super(message); + this.code = code; + this.name = this.constructor.name; + this.stack = stack; + } +} diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/core/src/models/auth-api-request.ts b/packages/core/src/models/auth-api-request.ts new file mode 100644 index 00000000..6e48bb49 --- /dev/null +++ b/packages/core/src/models/auth-api-request.ts @@ -0,0 +1,45 @@ +/** + * 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. + */ + +/** + * Interface for the Authn API request body. + */ +export interface AuthApiRequestBody { + /** + * The authentication flow id. + */ + flowId: string; + /** + * Contains selected authenticator's required details. + */ + selectedAuthenticator: SelectedAuthenticator; +} + +/** + * Interface for the selected authenticator. + */ +export interface SelectedAuthenticator { + /** + * The authentication authenticator id. + */ + authenticatorId: string; + /** + *Required parameters for the selected authenticator. + */ + params?: Record; +} diff --git a/packages/core/src/models/auth-api-response.ts b/packages/core/src/models/auth-api-response.ts new file mode 100644 index 00000000..81bd6a6e --- /dev/null +++ b/packages/core/src/models/auth-api-response.ts @@ -0,0 +1,256 @@ +/** + * 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. + */ + +/** + * Interface for the Authn and Authz API response. + */ +export interface AuthApiResponse { + /** + *If user is successfully authenticated, contains the authentication data. + */ + authData?: AuthData; + /** + *A unique identifier for the authentication flow. + */ + flowId: string; + /** + * The status of the authentication flow. + */ + flowStatus: FlowStatus; + /** + * The type of the authentication flow. + */ + flowType: string; + /** + * Contains the urls related to the authentication flow. + */ + links: Link[]; + /** + * Contains the authenticator data related to the next step. + */ + nextStep: AuthStep; +} + +/** + * Interface for the authentication data after flow status become SUCCESS_COMPLETED. + */ +export interface AuthData { + /** + * Code of the authentication flow + */ + code: string; + /** + * Session state of the authentication flow + */ + session_state: string; +} + +/** + * Enum for the flow status. + */ +export enum FlowStatus { + /** + * The authentication flow is failed. + */ + FailIncomplete = 'FAIL_INCOMPLETE', + /** + * The authentication flow is incomplete. + */ + Incomplete = 'INCOMPLETE', + /** + * The authentication flow is success. + */ + SuccessCompleted = 'SUCCESS_COMPLETED', +} + +/** + * Interface for the link. + */ +export interface Link { + /** + * The relative url of the link. + */ + href: string; + /** + * The supported http methods of the link. + */ + method: LinkMethod; + /** + * The identifier of the link. + */ + name: string; +} + +/** + * Enum for the link method. + */ +export enum LinkMethod { + Get = 'GET', + Post = 'POST', +} + +/** + * Interface for the authentication step. + */ +export interface AuthStep { + /** + * Contains the data related to the available authentication steps. + */ + authenticators: Authenticator[]; + /** + * The type of the next step in the authentication flow. + */ + stepType: StepType; +} + +/** + * Enum for the step type. + */ +export enum StepType { + /** + * The next step is for authenticating the user through a configured authenticator. + */ + AuthenticatorPrompt = 'AUTHENTICATOR_PROMPT', + /** + * The next step is for authenticator selection. + */ + MultiOptionsPrompt = 'MULTI_OPTIONS_PROMPT', +} + +/** + * Interface for the authenticator. + */ +export interface Authenticator { + /** + * The authenticator name. + */ + authenticator: string; + /** + * The authenticator identifier. + */ + authenticatorId: string; + /** + * The identity provider identifier. + */ + idp: string; + /** + * The metadata related to the authenticator. + */ + metadata: Metadata; + /** + * Contains the required parameters that should be sent to the server for + * processing the current step of the authentication request. + */ + requiredParams: string[]; +} + +/** + * Interface for the metadata. + */ +export interface Metadata { + /** + * Contains any additional data related to the authenticator which would be + * needed for the application to perform authentication. + */ + additionalData?: AdditionalData; + /** + * The i18n key for the authenticator. + */ + i18nKey: string; + /** + * If the promptType is USER_PROMPT, contains the data related to input parameters of the authenticator. + * */ + params?: Params; + /** + * The type of the prompt. + */ + promptType: PromptType; +} + +/** + * Enum for the prompt type. + */ +export enum PromptType { + /** + * The prompt is for the system to perform an internal action which + * will result in obtaining the required parameters. + */ + InternalPrompt = 'INTERNAL_PROMPT', + /** + * The prompt is for the user to be redirected to a different url which + * will result in obtaining the required parameters. + */ + RedirectionPromt = 'REDIRECTION_PROMPT', + /** + * The prompt is for the user to input the required parameters for the authenticator. + */ + UserPrompt = 'USER_PROMPT', +} + +/** + * Interface for the params. + */ +export interface Params { + /** + * Indicates whether the parameter is confidential or not. + */ + confidential: boolean; + /** + * Display name when prompting for the user. + */ + displayName: string; + /** + * The i18n key for the parameter. + */ + i18nKey: string; + /** + * Indicates the recommended display order of the parameter. + */ + order: number; + /* + * The parameter identifier. + */ + param: string; + /** + * Indicates the data type of the parameter. + */ + type: ParamsType; +} + +/** + * Enum for the params type. + */ +export enum ParamsType { + Boolean = 'BOOLEAN', + Integer = 'INTEGER', + String = 'STRING', +} + +/** + * Interface for the additional data. + */ +export interface AdditionalData { + /** + * Redirect URL for the redirection prompt. + */ + redirectUrl: string; + /** + * The state of the authentication flow. + */ + state: string; +} diff --git a/packages/core/src/models/auth-config.ts b/packages/core/src/models/auth-config.ts new file mode 100644 index 00000000..db96624c --- /dev/null +++ b/packages/core/src/models/auth-config.ts @@ -0,0 +1,62 @@ +/** + * 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. + */ + +import {AsgardeoAuthClient, AuthClientConfig} from '@asgardeo/auth-js'; + +/** + * Interface for the configuration extension from the AuthClientConfig of '@asgardeo/auth-js'. + */ +interface AuthClientConfigExtension { + /** + * If enabled, the branding from the console will be used. Default value is true. + */ + enableConsoleBranding?: boolean; + /** + * If enabled, the text branding from the console will be used for the text. Default value is true. + */ + enableConsoleTextBranding?: boolean; + /* Language code of the locale. */ + locale?: string; + /** + * Tenant/Application name to filter the retrieval of customizations. + */ + name?: string; + /** + * Type to filter the retrieval of customizations. + */ + type?: OrgType; +} + +/** + * Enum for the organization type. + */ +export enum OrgType { + App = 'APP', + Custom = 'CUSTOM', + Org = 'ORG', +} + +/** + * Type for the UI Auth configuration. + */ +export type UIAuthConfig = AuthClientConfig; + +/** + * Type for the UI Auth client. + */ +export type UIAuthClient = AsgardeoAuthClient; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 575c3859..606373e2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,22 +13,32 @@ importers: version: 18.2.4 packages/core: + dependencies: + '@asgardeo/auth-js': + specifier: ^5.0.1 + version: 5.0.1 + '@asgardeo/js-ui-core': + specifier: 'link:' + version: 'link:' devDependencies: '@types/node': specifier: ^20.12.7 version: 20.12.7 '@wso2/eslint-plugin': - specifier: https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?5bf60cabe9e9a2571e8b1dd16d0c3bdc76db2c4f - version: '@gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?5bf60cabe9e9a2571e8b1dd16d0c3bdc76db2c4f(eslint@8.57.0)(typescript@5.4.5)' + specifier: https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?fa0b844715320a3953d6d055997c0770f8695082 + version: '@gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?fa0b844715320a3953d6d055997c0770f8695082(eslint@8.57.0)(typescript@5.4.5)' '@wso2/prettier-config': - specifier: https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/prettier-config?5bf60cabe9e9a2571e8b1dd16d0c3bdc76db2c4f - version: '@gitpkg.now.sh/brionmario/wso2-ui-configs/packages/prettier-config?5bf60cabe9e9a2571e8b1dd16d0c3bdc76db2c4f(prettier@3.2.5)(typescript@5.4.5)' + specifier: https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/prettier-config?fa0b844715320a3953d6d055997c0770f8695082 + version: '@gitpkg.now.sh/brionmario/wso2-ui-configs/packages/prettier-config?fa0b844715320a3953d6d055997c0770f8695082(prettier@3.2.5)(typescript@5.4.5)' eslint: specifier: ~8.57.0 version: 8.57.0 prettier: specifier: ^3.2.5 version: 3.2.5 + tslib: + specifier: ^2.6.2 + version: 2.6.2 typescript: specifier: ^5.4.5 version: 5.4.5 @@ -48,6 +58,10 @@ packages: '@jridgewell/trace-mapping': 0.3.25 dev: true + /@asgardeo/auth-js@5.0.1: + resolution: {integrity: sha512-XTb/+jPPBAnNGlZYeHVz2Ut5hI8DeJiMmX5YcAijiAvtW4Ove82lT4aLXm+FL8XmCYc+61hFNG1QLf8q2nMfSQ==} + dev: false + /@babel/code-frame@7.24.2: resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==} engines: {node: '>=6.9.0'} @@ -938,8 +952,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001610 - electron-to-chromium: 1.4.736 + caniuse-lite: 1.0.30001612 + electron-to-chromium: 1.4.747 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.23.0) dev: true @@ -967,8 +981,8 @@ packages: engines: {node: '>=6'} dev: true - /caniuse-lite@1.0.30001610: - resolution: {integrity: sha512-QFutAY4NgaelojVMjY63o6XlZyORPaLfyMnsl3HgnWdJUcX6K0oaJymHjH8PT5Gk7sTm8rvC/c5COUQKXqmOMA==} + /caniuse-lite@1.0.30001612: + resolution: {integrity: sha512-lFgnZ07UhaCcsSZgWW0K5j4e69dK1u/ltrL9lTUiFOwNHs12S3UMIEYgBV0Z6C6hRDev7iRnMzzYmKabYdXF9g==} dev: true /chalk@2.4.2: @@ -1107,7 +1121,7 @@ packages: supports-color: optional: true dependencies: - ms: 2.1.3 + ms: 2.1.2 dev: true /debug@4.3.4: @@ -1205,8 +1219,8 @@ packages: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} dev: true - /electron-to-chromium@1.4.736: - resolution: {integrity: sha512-Rer6wc3ynLelKNM4lOCg7/zPQj8tPOCB2hzD32PX9wd3hgRRi9MxEbmkFCokzcEhRVMiOVLjnL9ig9cefJ+6+Q==} + /electron-to-chromium@1.4.747: + resolution: {integrity: sha512-+FnSWZIAvFHbsNVmUxhEqWiaOiPMcfum1GQzlWCg/wLigVtshOsjXHyEFfmt6cFK6+HkS3QOJBv6/3OPumbBfw==} dev: true /emoji-regex@8.0.0: @@ -2567,10 +2581,6 @@ packages: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true - /ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: true - /natural-compare-lite@1.4.0: resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} dev: true @@ -3486,9 +3496,9 @@ packages: engines: {node: '>=10'} dev: true - '@gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?5bf60cabe9e9a2571e8b1dd16d0c3bdc76db2c4f(eslint@8.57.0)(typescript@5.4.5)': - resolution: {tarball: https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?5bf60cabe9e9a2571e8b1dd16d0c3bdc76db2c4f} - id: '@gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?5bf60cabe9e9a2571e8b1dd16d0c3bdc76db2c4f' + '@gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?fa0b844715320a3953d6d055997c0770f8695082(eslint@8.57.0)(typescript@5.4.5)': + resolution: {tarball: https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?fa0b844715320a3953d6d055997c0770f8695082} + id: '@gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?fa0b844715320a3953d6d055997c0770f8695082' name: '@wso2/eslint-plugin' version: 0.1.0 engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0} @@ -3531,9 +3541,9 @@ packages: - supports-color dev: true - '@gitpkg.now.sh/brionmario/wso2-ui-configs/packages/prettier-config?5bf60cabe9e9a2571e8b1dd16d0c3bdc76db2c4f(prettier@3.2.5)(typescript@5.4.5)': - resolution: {tarball: https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/prettier-config?5bf60cabe9e9a2571e8b1dd16d0c3bdc76db2c4f} - id: '@gitpkg.now.sh/brionmario/wso2-ui-configs/packages/prettier-config?5bf60cabe9e9a2571e8b1dd16d0c3bdc76db2c4f' + '@gitpkg.now.sh/brionmario/wso2-ui-configs/packages/prettier-config?fa0b844715320a3953d6d055997c0770f8695082(prettier@3.2.5)(typescript@5.4.5)': + resolution: {tarball: https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/prettier-config?fa0b844715320a3953d6d055997c0770f8695082} + id: '@gitpkg.now.sh/brionmario/wso2-ui-configs/packages/prettier-config?fa0b844715320a3953d6d055997c0770f8695082' name: '@wso2/prettier-config' version: 0.1.0 engines: {node: '>=14.0.0'} diff --git a/pull_request_template.md b/pull_request_template.md index 9b32185a..7d7404b7 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -1,52 +1,21 @@ -## Purpose -> Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc. - -## Goals -> Describe the solutions that this feature/fix will introduce to resolve the problems described above - -## Approach -> Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here. - -## User stories -> Summary of user stories addressed by this change> - -## Release note -> Brief description of the new feature or bug fix as it will appear in the release notes - -## Documentation -> Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact - -## Training -> Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable - -## Certification -> Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why. - -## Marketing -> Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable - -## Automation tests - - Unit tests - > Code coverage information - - Integration tests - > Details about the test cases and coverage - -## Security checks - - Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes/no - - Ran FindSecurityBugs plugin and verified report? yes/no - - Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes/no - -## Samples -> Provide high-level details about the samples related to this feature - -## Related PRs -> List any other related PRs - -## Migrations (if applicable) -> Describe migration steps and platforms on which migration has been tested - -## Test environment -> List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested - -## Learning -> Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem. \ No newline at end of file +### Purpose + + +### Related Issues +- + +### Related PRs +- + +### Checklist +- [ ] e2e cypress tests locally verified. +- [ ] Manual test round performed and verified. +- [ ] UX/UI review done on the final implementation. +- [ ] Documentation provided. (Add links if there are any) +- [ ] Unit tests provided. (Add links if there are any) +- [ ] Integration tests provided. (Add links if there are any) + +### Security checks +- [ ] Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? +- [ ] Ran FindSecurityBugs plugin and verified report? +- [ ] Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? \ No newline at end of file