Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions e2e/davinci-app/components/boolean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
import { dotToCamelCase, richContentInterpolation } from '../helper.js';

import type {
ValidatedBooleanCollector,
Updater,
ValidatedBooleanCollector,
Validator,
} from '@forgerock/davinci-client/types';
import { dotToCamelCase, richContentInterpolation } from '../helper.js';

/**
* Creates a single checkbox and attaches it to the form
Expand Down
5 changes: 3 additions & 2 deletions e2e/davinci-app/components/fido.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
* of the MIT license. See the LICENSE file for details.
*/
import { fido } from '@forgerock/davinci-client';

import type {
FidoRegistrationCollector,
FidoAuthenticationCollector,
Updater,
FidoClient,
FidoRegistrationCollector,
Updater,
} from '@forgerock/davinci-client/types';

export default function fidoComponent(
Expand Down
3 changes: 2 additions & 1 deletion e2e/davinci-app/components/label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
import type { ReadOnlyCollector, RichTextCollector } from '@forgerock/davinci-client/types';
import { richContentInterpolation } from '../helper.js';

import type { ReadOnlyCollector, RichTextCollector } from '@forgerock/davinci-client/types';

export default function (
formEl: HTMLFormElement,
collector: ReadOnlyCollector | RichTextCollector,
Expand Down
5 changes: 3 additions & 2 deletions e2e/davinci-app/components/password.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
import { dotToCamelCase } from '../helper.js';

import type {
PasswordCollector,
ValidatedPasswordCollector,
Updater,
ValidatedPasswordCollector,
Validator,
} from '@forgerock/davinci-client/types';
import { dotToCamelCase } from '../helper.js';

const UPPERCASE_RE = /^[A-Z]+$/;
const LOWERCASE_RE = /^[a-z]+$/;
Expand Down
2 changes: 1 addition & 1 deletion e2e/davinci-app/components/polling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
import type { PollingCollector, Poller, Updater } from '@forgerock/davinci-client/types';
import type { Poller, PollingCollector, Updater } from '@forgerock/davinci-client/types';

export default function pollingComponent(
formEl: HTMLFormElement,
Expand Down
2 changes: 1 addition & 1 deletion e2e/davinci-app/components/protect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/
import type {
TextCollector,
ValidatedTextCollector,
Updater,
ValidatedTextCollector,
} from '@forgerock/davinci-client/types';

export default function protectComponent(
Expand Down
2 changes: 1 addition & 1 deletion e2e/davinci-app/components/social-login-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
import type { InternalErrorResponse, IdpCollector } from '@forgerock/davinci-client/types';
import type { IdpCollector, InternalErrorResponse } from '@forgerock/davinci-client/types';

export default function submitButtonComponent(
formEl: HTMLFormElement,
Expand Down
5 changes: 3 additions & 2 deletions e2e/davinci-app/components/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
import { dotToCamelCase } from '../helper.js';

import type {
TextCollector,
ValidatedTextCollector,
Updater,
ValidatedTextCollector,
Validator,
} from '@forgerock/davinci-client/types';
import { dotToCamelCase } from '../helper.js';

export default function textComponent(
formEl: HTMLFormElement,
Expand Down
44 changes: 22 additions & 22 deletions e2e/davinci-app/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,39 @@
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
import './style.css';

import { davinci } from '@forgerock/davinci-client';
import { oidc } from '@forgerock/oidc-client';
import type { OidcConfig } from '@forgerock/oidc-client/types';
import { protect } from '@forgerock/protect';

import './style.css';
import agreementComponent from './components/agreement.js';
import booleanComponent from './components/boolean.js';
import fidoComponent from './components/fido.js';
import flowLinkComponent from './components/flow-link.js';
import labelComponent from './components/label.js';
import multiValueComponent from './components/multi-value.js';
import objectValueComponent from './components/object-value.js';
import passwordComponent from './components/password.js';
import pollingComponent from './components/polling.js';
import protectComponent from './components/protect.js';
import qrCodeComponent from './components/qr-code.js';
import singleValueComponent from './components/single-value.js';
import socialLoginButtonComponent from './components/social-login-button.js';
import submitButtonComponent from './components/submit-button.js';
import textComponent from './components/text.js';
import { serverConfigs } from './server-configs.js';

import type {
CustomLogger,
DaVinciConfig,
DavinciClient,
DaVinciConfig,
GetClient,
InternalErrorResponse,
NodeStates,
ProtectCollector,
RequestMiddleware,
} from '@forgerock/davinci-client/types';
import { protect } from '@forgerock/protect';

import textComponent from './components/text.js';
import passwordComponent from './components/password.js';
import submitButtonComponent from './components/submit-button.js';
import protectComponent from './components/protect.js';
import flowLinkComponent from './components/flow-link.js';
import socialLoginButtonComponent from './components/social-login-button.js';
import { serverConfigs } from './server-configs.js';
import singleValueComponent from './components/single-value.js';
import multiValueComponent from './components/multi-value.js';
import labelComponent from './components/label.js';
import objectValueComponent from './components/object-value.js';
import fidoComponent from './components/fido.js';
import qrCodeComponent from './components/qr-code.js';
import agreementComponent from './components/agreement.js';
import pollingComponent from './components/polling.js';
import booleanComponent from './components/boolean.js';
import type { OidcConfig } from '@forgerock/oidc-client/types';

const loggerFn = {
error: () => {
Expand Down
3 changes: 2 additions & 1 deletion e2e/device-client-app/src/device-binding/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
*/

import { Console, Effect } from 'effect';
import { getUser, LoginAndGetClient, handleError, handleSuccess } from '../utils/index.js';

import { getUser, handleError, handleSuccess, LoginAndGetClient } from '../utils/index.js';

const deviceBinding = Effect.gen(function* () {
const client = yield* LoginAndGetClient;
Expand Down
3 changes: 2 additions & 1 deletion e2e/device-client-app/src/device-profile/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
*/

import { Console, Effect } from 'effect';
import { getUser, LoginAndGetClient, handleError, handleSuccess } from '../utils/index.js';

import { getUser, handleError, handleSuccess, LoginAndGetClient } from '../utils/index.js';

const deviceProfiling = Effect.gen(function* () {
const client = yield* LoginAndGetClient;
Expand Down
3 changes: 2 additions & 1 deletion e2e/device-client-app/src/oath/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
*/

import { Console, Effect } from 'effect';
import { getUser, LoginAndGetClient, handleError, handleSuccess } from '../utils/index.js';

import { getUser, handleError, handleSuccess, LoginAndGetClient } from '../utils/index.js';

const oath = Effect.gen(function* () {
const client = yield* LoginAndGetClient;
Expand Down
3 changes: 2 additions & 1 deletion e2e/device-client-app/src/push/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
*/

import { Console, Effect } from 'effect';
import { getUser, LoginAndGetClient, handleError, handleSuccess } from '../utils/index.js';

import { getUser, handleError, handleSuccess, LoginAndGetClient } from '../utils/index.js';

const push = Effect.gen(function* () {
const client = yield* LoginAndGetClient;
Expand Down
2 changes: 1 addition & 1 deletion e2e/device-client-app/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { deviceClient } from '@forgerock/device-client';
import type { deviceClient } from '@forgerock/device-client';

export type DeviceClient = ReturnType<typeof deviceClient>;
13 changes: 8 additions & 5 deletions e2e/device-client-app/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
import { deviceClient } from '@forgerock/device-client';
import type { ConfigOptions, DeviceClient } from '@forgerock/device-client/types';
import {
CallbackType,
Config,
FRAuth,
SessionManager,
TokenManager,
UserManager,
} from '@forgerock/javascript-sdk';
import { Console, Effect } from 'effect';

import type { ConfigOptions, DeviceClient } from '@forgerock/device-client/types';
import type {
FRLoginFailure,
FRLoginSuccess,
FRStep,
NameCallback,
PasswordCallback,
SessionManager,
TokenManager,
UserManager,
} from '@forgerock/javascript-sdk';
import { Console, Effect } from 'effect';

const logout = Effect.ignore(
Effect.tryPromise({
Expand Down
3 changes: 2 additions & 1 deletion e2e/device-client-app/src/webauthn/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
*/

import { Console, Effect } from 'effect';
import { getUser, LoginAndGetClient, handleError, handleSuccess } from '../utils/index.js';

import { getUser, handleError, handleSuccess, LoginAndGetClient } from '../utils/index.js';

const webauthn = Effect.gen(function* () {
const client = yield* LoginAndGetClient;
Expand Down
2 changes: 1 addition & 1 deletion e2e/device-client-app/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types='vitest' />
import { defineConfig } from 'vite';
import * as path from 'path';
import { defineConfig } from 'vite';

const pages = ['oath', 'push', 'webauthn', 'device-binding', 'device-profile'];

Expand Down
48 changes: 24 additions & 24 deletions e2e/journey-app/callback-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,30 @@
* of the MIT license. See the LICENSE file for details.
*/

import {
attributeInputComponent,
choiceComponent,
confirmationComponent,
deviceProfileComponent,
hiddenValueComponent,
kbaCreateComponent,
metadataComponent,
passwordComponent,
pingProtectEvaluationComponent,
pingProtectInitializeComponent,
pollingWaitComponent,
recaptchaComponent,
recaptchaEnterpriseComponent,
redirectComponent,
selectIdpComponent,
suspendedTextOutputComponent,
termsAndConditionsComponent,
textInputComponent,
textOutputComponent,
validatedPasswordComponent,
validatedUsernameComponent,
} from './components/index.js';

import type {
AttributeInputCallback,
BaseCallback,
Expand All @@ -31,30 +55,6 @@ import type {
ValidatedCreateUsernameCallback,
} from '@forgerock/journey-client/types';

import {
attributeInputComponent,
choiceComponent,
confirmationComponent,
deviceProfileComponent,
hiddenValueComponent,
kbaCreateComponent,
metadataComponent,
passwordComponent,
pingProtectEvaluationComponent,
pingProtectInitializeComponent,
pollingWaitComponent,
recaptchaComponent,
recaptchaEnterpriseComponent,
redirectComponent,
selectIdpComponent,
suspendedTextOutputComponent,
termsAndConditionsComponent,
textInputComponent,
textOutputComponent,
validatedPasswordComponent,
validatedUsernameComponent,
} from './components/index.js';

/**
* Renders a callback component based on its type
* @param journeyEl - The container element to append the component to
Expand Down
1 change: 1 addition & 0 deletions e2e/journey-app/components/device-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* of the MIT license. See the LICENSE file for details.
*/
import { Device } from '@forgerock/journey-client/device';

import type { DeviceProfileCallback } from '@forgerock/journey-client/types';

/**
Expand Down
3 changes: 2 additions & 1 deletion e2e/journey-app/components/ping-protect-evaluation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
import type { PingOneProtectEvaluationCallback } from '@forgerock/journey-client/types';
import { getProtectInstance } from './ping-protect-initialize.js';

import type { PingOneProtectEvaluationCallback } from '@forgerock/journey-client/types';

/**
* PingOne Protect Evaluation Component
* Automatically collects device and behavioral signals using the Protect SDK
Expand Down
1 change: 1 addition & 0 deletions e2e/journey-app/components/ping-protect-initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* of the MIT license. See the LICENSE file for details.
*/
import { protect } from '@forgerock/protect';

import type { PingOneProtectInitializeCallback } from '@forgerock/journey-client/types';

// Global storage for protect instance to be used by evaluation component
Expand Down
3 changes: 2 additions & 1 deletion e2e/journey-app/components/qr-code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
* of the MIT license. See the LICENSE file for details.
*/
import { QRCode } from '@forgerock/journey-client/qr-code';
import type { JourneyStep, ConfirmationCallback } from '@forgerock/journey-client/types';

import type { ConfirmationCallback, JourneyStep } from '@forgerock/journey-client/types';

export function renderQRCodeStep(journeyEl: HTMLDivElement, step: JourneyStep): boolean {
if (!QRCode.isQRCodeStep(step)) {
Expand Down
3 changes: 2 additions & 1 deletion e2e/journey-app/components/recovery-codes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
* of the MIT license. See the LICENSE file for details.
*/
import { RecoveryCodes } from '@forgerock/journey-client/recovery-codes';
import type { JourneyStep, ConfirmationCallback } from '@forgerock/journey-client/types';

import type { ConfirmationCallback, JourneyStep } from '@forgerock/journey-client/types';

export function renderRecoveryCodesStep(journeyEl: HTMLDivElement, step: JourneyStep): boolean {
if (!RecoveryCodes.isDisplayStep(step)) {
Expand Down
3 changes: 2 additions & 1 deletion e2e/journey-app/components/webauthn-step.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
* of the MIT license. See the LICENSE file for details.
*/

import type { BaseCallback, JourneyStep } from '@forgerock/journey-client/types';
import { WebAuthn, WebAuthnStepType } from '@forgerock/journey-client/webauthn';

import { renderCallbacks } from '../callback-map.js';

import type { BaseCallback, JourneyStep } from '@forgerock/journey-client/types';

type WebAuthnStepHandlerResult = {
callbacksRendered: boolean;
didSubmit: boolean;
Expand Down
Loading
Loading