-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(mocked): update tests to make passcodes default and additional t…
…ests for `useOktaClassic`
- Loading branch information
Showing
7 changed files
with
2,095 additions
and
650 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
.../fixtures/okta-responses/success/idx-challenge-answer-password-enroll-email-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"code": 200, | ||
"response": { | ||
"version": "1.0.0", | ||
"stateHandle": "02.id.state~c.handle", | ||
"expiresAt": "2099-12-31T23:59:59.000Z", | ||
"remediation": { | ||
"type": "array", | ||
"value": [ | ||
{ | ||
"rel": ["create-form"], | ||
"name": "select-authenticator-enroll", | ||
"href": "https://profile.code.dev-theguardian.com/idp/idx/credential/enroll", | ||
"method": "POST", | ||
"produces": "application/ion+json; okta-version=1.0.0", | ||
"value": [ | ||
{ | ||
"name": "authenticator", | ||
"type": "object", | ||
"options": [ | ||
{ | ||
"label": "Email", | ||
"value": { | ||
"form": { | ||
"value": [ | ||
{ | ||
"name": "id", | ||
"required": true, | ||
"value": "id", | ||
"mutable": false | ||
}, | ||
{ | ||
"name": "methodType", | ||
"required": false, | ||
"value": "email", | ||
"mutable": false | ||
} | ||
] | ||
} | ||
}, | ||
"relatesTo": "$.authenticators.value[0]" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "stateHandle", | ||
"required": true, | ||
"value": "02.id.state~c.handle", | ||
"visible": false, | ||
"mutable": false | ||
} | ||
], | ||
"accepts": "application/json; okta-version=1.0.0" | ||
} | ||
] | ||
} | ||
} | ||
} |
229 changes: 229 additions & 0 deletions
229
cypress/fixtures/okta-responses/success/idx-challenge-response-email.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,229 @@ | ||
{ | ||
"code": 200, | ||
"response": { | ||
"version": "1.0.0", | ||
"stateHandle": "02.id.state~c.handle", | ||
"expiresAt": "2099-12-31T23:59:59.000Z", | ||
"intent": "LOGIN", | ||
"remediation": { | ||
"type": "array", | ||
"value": [ | ||
{ | ||
"rel": ["create-form"], | ||
"name": "challenge-authenticator", | ||
"relatesTo": ["$.currentAuthenticatorEnrollment"], | ||
"href": "https://profile.thegulocal.com/idp/idx/challenge/answer", | ||
"method": "POST", | ||
"produces": "application/ion+json; okta-version=1.0.0", | ||
"value": [ | ||
{ | ||
"name": "credentials", | ||
"type": "object", | ||
"form": { | ||
"value": [ | ||
{ | ||
"name": "passcode", | ||
"label": "Enter code" | ||
} | ||
] | ||
}, | ||
"required": true | ||
}, | ||
{ | ||
"name": "stateHandle", | ||
"required": true, | ||
"value": "02.id.state~c.handle", | ||
"visible": false, | ||
"mutable": false | ||
} | ||
], | ||
"accepts": "application/json; okta-version=1.0.0" | ||
}, | ||
{ | ||
"rel": ["create-form"], | ||
"name": "select-authenticator-authenticate", | ||
"href": "https://profile.thegulocal.com/idp/idx/challenge", | ||
"method": "POST", | ||
"produces": "application/ion+json; okta-version=1.0.0", | ||
"value": [ | ||
{ | ||
"name": "authenticator", | ||
"type": "object", | ||
"options": [ | ||
{ | ||
"label": "Email", | ||
"value": { | ||
"form": { | ||
"value": [ | ||
{ | ||
"name": "id", | ||
"required": true, | ||
"value": "emailId", | ||
"mutable": false | ||
}, | ||
{ | ||
"name": "methodType", | ||
"required": false, | ||
"value": "email", | ||
"mutable": false | ||
} | ||
] | ||
} | ||
}, | ||
"relatesTo": "$.authenticatorEnrollments.value[0]" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "stateHandle", | ||
"required": true, | ||
"value": "02.id.state~c.handle", | ||
"visible": false, | ||
"mutable": false | ||
} | ||
], | ||
"accepts": "application/json; okta-version=1.0.0" | ||
} | ||
] | ||
}, | ||
"currentAuthenticatorEnrollment": { | ||
"type": "object", | ||
"value": { | ||
"profile": { | ||
"email": "test@example.com" | ||
}, | ||
"resend": { | ||
"rel": ["create-form"], | ||
"name": "resend", | ||
"href": "https://profile.thegulocal.com/idp/idx/challenge/resend", | ||
"method": "POST", | ||
"produces": "application/ion+json; okta-version=1.0.0", | ||
"value": [ | ||
{ | ||
"name": "stateHandle", | ||
"required": true, | ||
"value": "02.id.state~c.handle", | ||
"visible": false, | ||
"mutable": false | ||
} | ||
], | ||
"accepts": "application/json; okta-version=1.0.0" | ||
}, | ||
"contextualData": { | ||
"useEmailMagicLink": false | ||
}, | ||
"type": "email", | ||
"key": "okta_email", | ||
"id": "emailId", | ||
"displayName": "Email", | ||
"methods": [ | ||
{ | ||
"type": "email" | ||
} | ||
] | ||
} | ||
}, | ||
"authenticators": { | ||
"type": "array", | ||
"value": [ | ||
{ | ||
"type": "email", | ||
"key": "okta_email", | ||
"id": "emailId", | ||
"displayName": "Email", | ||
"methods": [ | ||
{ | ||
"type": "email" | ||
} | ||
], | ||
"allowedFor": "any" | ||
} | ||
] | ||
}, | ||
"authenticatorEnrollments": { | ||
"type": "array", | ||
"value": [ | ||
{ | ||
"profile": { | ||
"email": "g***7@gmail.com" | ||
}, | ||
"type": "email", | ||
"key": "okta_email", | ||
"id": "emailId", | ||
"displayName": "Email", | ||
"methods": [ | ||
{ | ||
"type": "email" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"recoveryAuthenticator": { | ||
"type": "object", | ||
"value": { | ||
"type": "password", | ||
"key": "okta_password", | ||
"id": "passwordId", | ||
"displayName": "Password", | ||
"methods": [ | ||
{ | ||
"type": "password" | ||
} | ||
] | ||
} | ||
}, | ||
"user": { | ||
"type": "object", | ||
"value": { | ||
"identifier": "test@example.com" | ||
} | ||
}, | ||
"cancel": { | ||
"rel": ["create-form"], | ||
"name": "cancel", | ||
"href": "https://profile.thegulocal.com/idp/idx/cancel", | ||
"method": "POST", | ||
"produces": "application/ion+json; okta-version=1.0.0", | ||
"value": [ | ||
{ | ||
"name": "stateHandle", | ||
"required": true, | ||
"value": "02.id.state~c.handle", | ||
"visible": false, | ||
"mutable": false | ||
} | ||
], | ||
"accepts": "application/json; okta-version=1.0.0" | ||
}, | ||
"app": { | ||
"type": "object", | ||
"value": { | ||
"name": "oidc_client", | ||
"label": "sample_application", | ||
"id": "clientId" | ||
} | ||
}, | ||
"authentication": { | ||
"type": "object", | ||
"value": { | ||
"protocol": "OAUTH2.0", | ||
"issuer": { | ||
"id": "issuerId", | ||
"name": "Authorization Server", | ||
"uri": "https://profile.thegulocal.com/oauth2/issuerId" | ||
}, | ||
"request": { | ||
"max_age": -1, | ||
"scope": "openid", | ||
"response_type": "code", | ||
"redirect_uri": "localhost", | ||
"state": "state", | ||
"code_challenge_method": "S256", | ||
"code_challenge": "test", | ||
"response_mode": "query" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.