Skip to content
Open
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@ test-output
.cursor/rules/nx-rules.mdc
.github/instructions/nx.instructions.md

# Claude
.claude/worktrees
.claude/settings.local.json
.claude/skills
.claude/CLAUDE.md
tasks/
.opensource


Expand Down
45 changes: 34 additions & 11 deletions e2e/am-mock-api/src/app/responses.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* responses.js
*
* Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
* Copyright (c) 2020 - 2026 Ping Identity Corporation. All rights reserved.
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
Expand Down Expand Up @@ -60,7 +60,6 @@ export const createTxnStepUpUrl = (url) => {
redirectUrl.searchParams.set('authIndexType', 'composite_advice');
redirectUrl.searchParams.set(
'authIndexValue',
// eslint-disable-next-line max-len
'%3CAdvices%3E%3CAttributeValuePair%3E%3CAttribute%20name%3D%22TransactionConditionAdvice%22/%3E%3CValue%3E39dfdd15-59a3-473c-a7fc-ecda3bbc3bc8%3C/Value%3E%3C/AttributeValuePair%3E%3C/Advices%3E',
);

Expand All @@ -78,7 +77,6 @@ export const createTreeStepUpUrl = (url) => {
redirectUrl.searchParams.set('authIndexType', 'composite_advice');
redirectUrl.searchParams.set(
'authIndexValue',
// eslint-disable-next-line max-len
'%3CAdvices%3E%3CAttributeValuePair%3E%3CAttribute%20name=%22AuthenticateToServiceConditionAdvice%22/%3E%3CValue%3E/sdk:ConfirmPassword%3C/Value%3E%3C/AttributeValuePair%3E%3C/Advices%3E',
);

Expand Down Expand Up @@ -140,7 +138,6 @@ export const emailSuspend = {
{
name: 'message',
value:
// eslint-disable-next-line max-len
'An email has been sent to the address you entered. Click the link in that email to proceed.',
},
{ name: 'messageType', value: '0' },
Expand Down Expand Up @@ -367,6 +364,37 @@ export const pingProtectInitialize = {
],
};

export const pingProtectSignalsInitializationOptions = {
authId: 'foo',
callbacks: [
{
type: 'PingOneProtectInitializeCallback',
output: [
{
name: 'signalsInitializationOptions',
value: {
behavioralDataCollection: 'true',
consoleLogEnabled: 'true',
disableTags: 'false',
disableHub: 'false',
lazyMetadata: 'false',
deviceAttributesToIgnore: 'userAgent',
universalDeviceIdentification: 'false',
agentIdentification: 'false',
htmlGeoLocation: 'false',
},
},
],
input: [
{
name: 'IDToken1clientError',
value: '',
},
],
},
],
};

export const choiceCallback = {
authId: 'foo',
callbacks: [
Expand Down Expand Up @@ -592,7 +620,6 @@ export const redirectCallback = {
{
name: 'redirectUrl',
value:
// eslint-disable-next-line max-len
'http://localhost:9443/o/oauth2/v2/auth?nonce=ko7fdf2v3b6yctgq35bdpndel0p9qiq&response_type=code&client_id=546064052569-ke17g9ufsmvda3kgg7s5kp2hpf3gnqi8.apps.googleusercontent.com&scope=openid%20profile%20email&code_challenge=Bh_6aMiI04KGI1wVILtEamByklmXnQY9JKhKhlwsIxk&code_challenge_method=S256&state=rtu8pz65dbg6baw985d532myfbbnf5v',
},
{ name: 'redirectMethod', value: 'GET' },
Expand All @@ -609,9 +636,7 @@ export const redirectCallbackSaml = {
output: [
{
name: 'redirectUrl',
value:
// eslint-disable-next-line max-len
'http://localhost:9443/SAMLTest/',
value: 'http://localhost:9443/SAMLTest/',
},
{ name: 'redirectMethod', value: 'GET' },
{ name: 'trackingCookie', value: true },
Expand All @@ -627,9 +652,7 @@ export const redirectCallbackFailureSaml = {
output: [
{
name: 'redirectUrl',
value:
// eslint-disable-next-line max-len
'http://localhost:9443/SAMLFailure',
value: 'http://localhost:9443/SAMLFailure',
},
{ name: 'redirectMethod', value: 'GET' },
{ name: 'trackingCookie', value: true },
Expand Down
12 changes: 7 additions & 5 deletions e2e/am-mock-api/src/app/routes.auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* routes.auth.js
*
* Copyright (c) 2020 - 2025 Ping Identity Corporation. All rights reserved.
* Copyright (c) 2020 - 2026 Ping Identity Corporation. All rights reserved.
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
Expand All @@ -28,6 +28,7 @@ import {
pollingCallback,
pingProtectEvaluate,
pingProtectInitialize,
pingProtectSignalsInitializationOptions,
redirectCallback,
redirectCallbackSaml,
requestDeviceProfile,
Expand All @@ -42,7 +43,6 @@ import {
textInputCallback,
treeAuthz,
txnAuthz,
otpQRCodeCallbacks,
wellKnownForgeRock,
recaptchaEnterpriseCallback,
MetadataMarketPlaceInitialize,
Expand Down Expand Up @@ -94,6 +94,11 @@ export default function (app) {
res.json(nameCallback);
} else if (req.query.authIndexValue === 'TEST_LoginPingProtect') {
res.json({ ...pingProtectInitialize, authId: 'protect-journey-init' });
} else if (req.query.authIndexValue === 'TEST_LoginPingProtectSignalsOptions') {
res.json({
...pingProtectSignalsInitializationOptions,
authId: 'protect-journey-signals-init-options',
});
} else if (req.query.authIndexValue === 'IDMSocialLogin') {
res.json(selectIdPCallback);
} else if (req.query.authIndexValue === 'TEST_MetadataMarketPlace') {
Expand Down Expand Up @@ -449,10 +454,8 @@ export default function (app) {
});

app.post(authPaths.tokenExchange, wait, async (req, res) => {
// eslint-disable-next-line
const access_token = v4();
const refresh_token = v4();
// eslint-disable-next-line
const tokens = { ...oauthTokens, access_token, refresh_token };

if (req.path.includes('middleware')) {
Expand Down Expand Up @@ -496,7 +499,6 @@ export default function (app) {
} else {
const referrer = new URL(req.get('Referer'));
const additionalQueryParams =
// eslint-disable-next-line max-len
'state=rtu8pz65dbg6baw985d532myfbbnf5v&code=4%2F0AY0e-g5vHGhzfggdAuIofxnblW-iR1Y30G5lN5RvbrU8Zv5ZmtUVheTzSX7YMJF_usbzUA&scope=email+profile+openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&authuser=0&hd=forgerock.com&prompt=none';
const redirectUrl = `${referrer.href}${
referrer.href.includes('?') ? '&' : '?'
Expand Down
15 changes: 2 additions & 13 deletions e2e/journey-app/components/ping-protect-initialize.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
* Copyright (c) 2025 - 2026 Ping Identity Corporation. All rights reserved.
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
Expand Down Expand Up @@ -43,19 +43,8 @@ export default function pingProtectInitializeComponent(
const config = callback.getConfig();
console.log('Protect callback config:', config);

if (!config?.envId) {
const error = 'Missing envId in Protect configuration';
console.error(error);
callback.setClientError(error);
message.innerText = `Initialization failed: ${error}`;
message.style.color = 'red';
return;
}

console.log('Initializing Protect with envId:', config.envId);

// Create and store protect instance
protectInstance = protect({ envId: config.envId });
protectInstance = protect(config);
console.log('Protect instance created');

// Initialize the Protect SDK
Expand Down
Loading
Loading