-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow CDATA under some elements
- Loading branch information
1 parent
2cdedf3
commit 3d3e7df
Showing
5 changed files
with
136 additions
and
22 deletions.
There are no files selected for viewing
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
29 changes: 29 additions & 0 deletions
29
test/fixtures/resources/PO034/pass/AM-Payload-with-CDATA.xml
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,29 @@ | ||
<AssignMessage name='AM-Payload-with-CDATA'> | ||
<Description>This policy sets a payload</Description> | ||
<Set> | ||
|
||
<Payload contentType='application/json' variablePrefix='%' | ||
variableSuffix='#'><![CDATA[{ | ||
"access_token" : "%oauthv2accesstoken.OAuthV2-GenerateAccessToken-AuthzCode.access_token#", | ||
"refresh_token" : "%oauthv2accesstoken.OAuthV2-GenerateAccessToken-AuthzCode.refresh_token#", | ||
"scope" : "%oauthv2accesstoken.GetOAuthV2Info-AccessToken.scope#", | ||
"issued_at" : "%system.timestamp#", | ||
"expires_in" : "%oauthv2accesstoken.OAuthV2-GenerateAccessToken-AuthzCode.expires_in#", | ||
"application_name" : "%targetapp.displayName#", | ||
"status" : "%oauthv2accesstoken.GetOAuthV2Info-AccessToken.status#", | ||
"organization_name" : "%organization.name#" | ||
} | ||
]]></Payload> | ||
<StatusCode>200</StatusCode> | ||
<ReasonPhrase>OK</ReasonPhrase> | ||
</Set> | ||
|
||
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> | ||
|
||
<!-- Set this flow variable to indicate the response is to be returned --> | ||
<AssignVariable> | ||
<Name>flowResponse.ready</Name> | ||
<Value>true</Value> | ||
</AssignVariable> | ||
|
||
</AssignMessage> |
28 changes: 28 additions & 0 deletions
28
test/fixtures/resources/PO034/pass/AssignMessage-GoogleAuth302-Response.xml
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,28 @@ | ||
<AssignMessage name='AssignMessage-GoogleAuth302-Response'> | ||
<DisplayName>AssignMessage-GoogleAuth302</DisplayName> | ||
<!-- <AssignTo createNew='false' transport='http' type='request'></AssignTo> --> | ||
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> | ||
<Set> | ||
<!-- | ||
This is a 302-redirect to an Authentication request to Google. | ||
See the documentation at | ||
https://developers.google.com/identity/protocols/OpenIDConnect | ||
For demonstration purposes, you can add queryparam prompt=consent to get | ||
consent each time. Also, you can change the scope param to have | ||
Google ask for greater consent. | ||
To use your own app, modify the settings.js file in the | ||
apiproxy/resources/jsc directory | ||
with values for YOUR APP that you obtained from the Google | ||
Developers Console. | ||
--> | ||
<Headers> | ||
<Header | ||
name='Location'><![CDATA[https://accounts.google.com/o/oauth2/v2/auth?client_id={goog_client_id}&response_type=code&scope=openid%20email&redirect_uri={goog_redirect_uri}&state={state_token}]]></Header> | ||
</Headers> | ||
<StatusCode>302</StatusCode> | ||
<ReasonPhrase>Found</ReasonPhrase> | ||
</Set> | ||
</AssignMessage> |
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,17 @@ | ||
<AssignMessage name='AM-Request-2'> | ||
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> | ||
<Set> | ||
<Payload contentType='application/xml'> | ||
<NotResults> | ||
<Result> | ||
<name>something</name> | ||
<code>9283987494</code> | ||
</Result> | ||
<Result> | ||
<name>something-else</name> | ||
<code>12345</code> | ||
</Result> | ||
</NotResults> | ||
</Payload> | ||
</Set> | ||
</AssignMessage> |
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