-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
548 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
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,23 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<APIProxy revision="2" name="2-Legged-OAuth"> | ||
<Basepaths>/clientoauth</Basepaths> | ||
<ConfigurationVersion majorVersion="4" minorVersion="0"/> | ||
<CreatedAt>1576144374918</CreatedAt> | ||
<CreatedBy>[email protected]</CreatedBy> | ||
<Description>2-Legged OAuth Client_crendential</Description> | ||
<DisplayName>2-Legged-OAuth</DisplayName> | ||
<LastModifiedAt>1576144506514</LastModifiedAt> | ||
<LastModifiedBy>[email protected]</LastModifiedBy> | ||
<ManifestVersion>SHA-512:b56e29dcd3512a971cb564ff4109a79a49e2cc6656c9d229b9ce0e00fbcd6a795da7cff71043e2cae351690c3630d8e7e9273a1b76e96cf9918a2a0267742b40</ManifestVersion> | ||
<Policies> | ||
<Policy>GenerateToken</Policy> | ||
<Policy>verify-api-key</Policy> | ||
</Policies> | ||
<ProxyEndpoints> | ||
<ProxyEndpoint>default</ProxyEndpoint> | ||
</ProxyEndpoints> | ||
<Resources/> | ||
<Spec></Spec> | ||
<TargetServers/> | ||
<TargetEndpoints/> | ||
</APIProxy> |
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,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<Manifest name="manifest"> | ||
<Policies> | ||
<VersionInfo resourceName="GenerateToken" version="SHA-512:2e6f4a2e4d46ae638aab4dd147cb7ff7d7baebb4142b5d84094508a4ab3d4b1e0c8b344aa0f9a2446701909cb2f9493161e8a7243981af3e3ba502bc8f602c5b"/> | ||
<VersionInfo resourceName="verify-api-key" version="SHA-512:1462c3c9de8e73a1d5d7f518b3c1e339baaaa234735859c4cb998af83747f09d9a7273224a6f3745629956d107e9a44a72e0b3207f557ec4c3d78bd7cae94e98"/> | ||
</Policies> | ||
<ProxyEndpoints> | ||
<VersionInfo resourceName="default" version="SHA-512:a3665f2fec7a13fb1860785d1a2ec27ab0f4ff24e35689a3ac77e56bd88f19e58dd03b93570f786eaf88309a793334607584373c4cecd37042f5d0a3ec8a5c9a"/> | ||
</ProxyEndpoints> | ||
<Resources/> | ||
<SharedFlows/> | ||
<TargetEndpoints/> | ||
</Manifest> |
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,14 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<OAuthV2 async="false" continueOnError="false" enabled="true" name="GenerateToken"> | ||
<DisplayName>GenerateToken</DisplayName> | ||
<Properties/> | ||
<Attributes/> | ||
<ExternalAuthorization>false</ExternalAuthorization> | ||
<Operation>GenerateAccessToken</Operation> | ||
<ExpiresIn>3600000</ExpiresIn> | ||
<SupportedGrantTypes> | ||
<GrantType>client_credentials</GrantType> | ||
</SupportedGrantTypes> | ||
<GenerateResponse enabled="true"/> | ||
<Tokens/> | ||
</OAuthV2> |
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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<VerifyAPIKey async="false" continueOnError="false" enabled="true" name="verify-api-key"> | ||
<DisplayName>Verify API Key</DisplayName> | ||
<APIKey ref="request.formparam.client_id"/> | ||
</VerifyAPIKey> |
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,35 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<ProxyEndpoint name="default"> | ||
<Description/> | ||
<FaultRules/> | ||
<PreFlow name="PreFlow"> | ||
<Request> | ||
<Step> | ||
<Name>verify-api-key</Name> | ||
</Step> | ||
</Request> | ||
<Response/> | ||
</PreFlow> | ||
<PostFlow name="PostFlow"> | ||
<Request/> | ||
<Response/> | ||
</PostFlow> | ||
<Flows> | ||
<Flow name="GenerateOauthToken"> | ||
<Description>GenerateOauthToken</Description> | ||
<Request> | ||
<Step> | ||
<Name>GenerateToken</Name> | ||
</Step> | ||
</Request> | ||
<Response/> | ||
<Condition>(proxy.pathsuffix MatchesPath "/token") and (request.verb = "POST")</Condition> | ||
</Flow> | ||
</Flows> | ||
<HTTPProxyConnection> | ||
<BasePath>/clientoauth</BasePath> | ||
<Properties/> | ||
<VirtualHost>default</VirtualHost> | ||
</HTTPProxyConnection> | ||
<RouteRule name="noroute"/> | ||
</ProxyEndpoint> |
Binary file not shown.
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,33 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<APIProxy revision="2" name="CacheDemoApi"> | ||
<Basepaths>/cachedemoapi</Basepaths> | ||
<ConfigurationVersion majorVersion="4" minorVersion="0"/> | ||
<CreatedAt>1576144286350</CreatedAt> | ||
<CreatedBy>[email protected]</CreatedBy> | ||
<Description></Description> | ||
<DisplayName>CacheDemoApi</DisplayName> | ||
<LastModifiedAt>1576157529446</LastModifiedAt> | ||
<LastModifiedBy>[email protected]</LastModifiedBy> | ||
<ManifestVersion>SHA-512:0c4039eddea3161896409a244a481260cb44149ba614297bd7aeefb379b500adbb85e1a0587cdcd9d60b81407a37675f4fa500cf159b60652ef089a16cb02560</ManifestVersion> | ||
<Policies> | ||
<Policy>BuildAccessTokenRequest</Policy> | ||
<Policy>CheckAccessTokenCache</Policy> | ||
<Policy>ExtractAccessToken</Policy> | ||
<Policy>GetCredentials</Policy> | ||
<Policy>GetOAuthToken</Policy> | ||
<Policy>SetAccessToken</Policy> | ||
<Policy>SetAccessTokenCache</Policy> | ||
<Policy>SetAccessTokenFromCache</Policy> | ||
<Policy>remove-header-authorization</Policy> | ||
<Policy>verify-oauth-v2-access-token</Policy> | ||
</Policies> | ||
<ProxyEndpoints> | ||
<ProxyEndpoint>default</ProxyEndpoint> | ||
</ProxyEndpoints> | ||
<Resources/> | ||
<Spec></Spec> | ||
<TargetServers/> | ||
<TargetEndpoints> | ||
<TargetEndpoint>default</TargetEndpoint> | ||
</TargetEndpoints> | ||
</APIProxy> |
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,23 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<Manifest name="manifest"> | ||
<Policies> | ||
<VersionInfo resourceName="BuildAccessTokenRequest" version="SHA-512:4b463a3564492343406adfc263069ea2cf1f8daf06ec7c1b180f9749781e303d6a2feac4c45e611614d9e553522a724b308028a0ba027c2d160999f7687401e7"/> | ||
<VersionInfo resourceName="CheckAccessTokenCache" version="SHA-512:dbf1021efec0d32aef60692245243e503e944f35fc4ad0c9635cf73f0493faca8d910b4a6309e5230b27dfa50d21476861ec78fda93830d1b38edf9eb8674ef5"/> | ||
<VersionInfo resourceName="ExtractAccessToken" version="SHA-512:fbee21f408d46b425da6ea769b77a63afce62ace358e7d2e64e406d4b05bab20ce56088dd8d2318b61dcf7a74c0f40d4e0587aad2c86dcd5c7a49c9a7b355523"/> | ||
<VersionInfo resourceName="GetCredentials" version="SHA-512:5fe67e5eabc3312405493667ff67b0b4296bb45a0e231c9dbec21dcb86a2f85f4301d24f5f75432bae2927c73a2758a9fc7cc07ba2f1861f477e3b12b87d7b91"/> | ||
<VersionInfo resourceName="GetOAuthToken" version="SHA-512:36b47fab8c99e8e4f7989c7c27245a973b34148c17450708e0c2acac5ef0890fa4d054cec75af6f592a53c241cc2296c9a2ac6cc1f0db5b82d4bb14b3265e7d1"/> | ||
<VersionInfo resourceName="SetAccessToken" version="SHA-512:52266fdf956f5fc3e5bb198d0055a7531a50bcd19cd4d6e01edd995dc26acaac1548e14048d7d6b6475664ad48b48fc156edcc54027cb535f698b150c95112ce"/> | ||
<VersionInfo resourceName="SetAccessTokenCache" version="SHA-512:84845d57567bbeacdab2e522cc353435c2b6f975bb2a5a50243318e457da7cbede4646fb096363554e82ea3b23c19f52e74e16e5108cd007736993627cf54e44"/> | ||
<VersionInfo resourceName="SetAccessTokenFromCache" version="SHA-512:99471367c794231089601007f97472bee1c39a3cfeeb8d4b000c7c3a8fff8376388633de70dbce5598256dc270de8ff6a5d6d26b68414df0b933b055313256cb"/> | ||
<VersionInfo resourceName="remove-header-authorization" version="SHA-512:bb51e553b4b66ee4313fbfc0eaa76f08f3db66f9bd05cce9a1dc6542bada0501291719372fb4468a0b7f85ecceaaf0f8a0a397560a14b05f32e87d95423befb7"/> | ||
<VersionInfo resourceName="verify-oauth-v2-access-token" version="SHA-512:be186ad133f93aafcac3d31bcb907dc849e4d8d10dadc63132cec9986bb306f937d7e9786a40be6ba66e04f4239189c3197d9df3c0ccbb30d79b4bd70231894e"/> | ||
</Policies> | ||
<ProxyEndpoints> | ||
<VersionInfo resourceName="default" version="SHA-512:4f560a7c17081ec53779e8158360b18239fa23db4aa3da328b9ae416e776fc51be27cd0c2ab7611775aa634ad50909010623b446debca78f4ddd7bc0de3f2e1b"/> | ||
</ProxyEndpoints> | ||
<Resources/> | ||
<SharedFlows/> | ||
<TargetEndpoints> | ||
<VersionInfo resourceName="default" version="SHA-512:28fe8c8d68f09fc4c4f38ec474f05214925397c7adec2c5bc2c63af560fa5b8f159611ac65b16512784e0c3380cc97bf28d1a0697b4b98f202a72fe2f81ecbbc"/> | ||
</TargetEndpoints> | ||
</Manifest> |
18 changes: 18 additions & 0 deletions
18
CacheDemoApi/apiproxy/policies/BuildAccessTokenRequest.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,18 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<AssignMessage async="false" continueOnError="false" enabled="true" name="BuildAccessTokenRequest"> | ||
<DisplayName>BuildAccessTokenRequest</DisplayName> | ||
<Properties/> | ||
<Set> | ||
<Headers> | ||
<Header name="Accept">application/json</Header> | ||
</Headers> | ||
<FormParams> | ||
<FormParam name="grant_type">client_credentials</FormParam> | ||
<FormParam name="client_id">ZCEk72XewNHAFALMq26cakp3pvGF2vVG</FormParam> | ||
<FormParam name="client_secret">HMpwSifJjwq42ifV</FormParam> | ||
</FormParams> | ||
<Verb>POST</Verb> | ||
</Set> | ||
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> | ||
<AssignTo type="request" transport="http" createNew="true">OAuthAccessTokenRequest</AssignTo> | ||
</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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<LookupCache async="false" continueOnError="false" enabled="true" name="CheckAccessTokenCache"> | ||
<DisplayName>CheckAccessTokenCache</DisplayName> | ||
<Properties/> | ||
<CacheKey> | ||
<Prefix>ExternalOAuth_</Prefix> | ||
<KeyFragment>{ext.clientId}</KeyFragment> | ||
</CacheKey> | ||
<CacheResource>ExtApiCache</CacheResource> | ||
<Scope>Exclusive</Scope> | ||
<AssignTo>external.oauth.cached.accessToken</AssignTo> | ||
</LookupCache> |
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<ExtractVariables async="false" continueOnError="false" enabled="true" name="ExtractAccessToken"> | ||
<DisplayName>ExtractAccessToken</DisplayName> | ||
<Properties/> | ||
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> | ||
<JSONPayload> | ||
<Variable name="access_token"> | ||
<JSONPath>$.access_token</JSONPath> | ||
</Variable> | ||
</JSONPayload> | ||
<Source clearPayload="false">OAuthAccessTokenResponse</Source> | ||
</ExtractVariables> |
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,18 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="GetCredentials" mapIdentifier="externalApp"> | ||
<DisplayName>GetCredentials</DisplayName> | ||
<Properties/> | ||
<ExclusiveCache>false</ExclusiveCache> | ||
<ExpiryTimeInSecs>300</ExpiryTimeInSecs> | ||
<Get assignTo="ext.clientId" index="1"> | ||
<Key> | ||
<Parameter>clientId</Parameter> | ||
</Key> | ||
</Get> | ||
<Get assignTo="ext.clientSecret" index="1"> | ||
<Key> | ||
<Parameter>clientSecret</Parameter> | ||
</Key> | ||
</Get> | ||
<Scope>environment</Scope> | ||
</KeyValueMapOperations> |
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<ServiceCallout async="false" continueOnError="false" enabled="true" name="GetOAuthToken"> | ||
<DisplayName>GetOAuthToken</DisplayName> | ||
<Properties/> | ||
<Request clearPayload="true" variable="OAuthAccessTokenRequest"> | ||
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> | ||
</Request> | ||
<Response>OAuthAccessTokenResponse</Response> | ||
<HTTPTargetConnection> | ||
<URL>http://pamesh12-eval-test.apigee.net/externaloauthapi/token</URL> | ||
</HTTPTargetConnection> | ||
</ServiceCallout> |
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,11 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<AssignMessage async="false" continueOnError="false" enabled="true" name="SetAccessToken"> | ||
<DisplayName>SetAccessToken</DisplayName> | ||
<Set> | ||
<Headers> | ||
<Header name="Authorization">Bearer {access_token}</Header> | ||
</Headers> | ||
</Set> | ||
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> | ||
<AssignTo createNew="true" transport="http" type="request"/> | ||
</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,15 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<PopulateCache async="false" continueOnError="false" enabled="true" name="SetAccessTokenCache"> | ||
<DisplayName>SetAccessTokenCache</DisplayName> | ||
<Properties/> | ||
<CacheKey> | ||
<Prefix>ExternalOAuth_</Prefix> | ||
<KeyFragment>{ext.clientId}</KeyFragment> | ||
</CacheKey> | ||
<Scope>Exclusive</Scope> | ||
<CacheResource>ExtApiCache</CacheResource> | ||
<ExpirySettings> | ||
<TimeoutInSec>3600</TimeoutInSec> | ||
</ExpirySettings> | ||
<Source>access_token</Source> | ||
</PopulateCache> |
12 changes: 12 additions & 0 deletions
12
CacheDemoApi/apiproxy/policies/SetAccessTokenFromCache.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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<AssignMessage async="false" continueOnError="false" enabled="true" name="SetAccessTokenFromCache"> | ||
<DisplayName>SetAccessTokenFromCache</DisplayName> | ||
<Properties/> | ||
<Set> | ||
<Headers> | ||
<Header name="Authorization">Bearer {external.oauth.cached.accessToken}</Header> | ||
</Headers> | ||
</Set> | ||
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> | ||
<AssignTo createNew="true" transport="http" type="request"/> | ||
</AssignMessage> |
11 changes: 11 additions & 0 deletions
11
CacheDemoApi/apiproxy/policies/remove-header-authorization.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,11 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<AssignMessage async="false" continueOnError="false" enabled="true" name="remove-header-authorization"> | ||
<DisplayName>Remove Header Authorization</DisplayName> | ||
<Remove> | ||
<Headers> | ||
<Header name="Authorization"/> | ||
</Headers> | ||
</Remove> | ||
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> | ||
<AssignTo createNew="false" transport="http" type="request"/> | ||
</AssignMessage> |
5 changes: 5 additions & 0 deletions
5
CacheDemoApi/apiproxy/policies/verify-oauth-v2-access-token.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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<OAuthV2 async="false" continueOnError="false" enabled="true" name="verify-oauth-v2-access-token"> | ||
<DisplayName>Verify OAuth v2.0 Access Token</DisplayName> | ||
<Operation>VerifyAccessToken</Operation> | ||
</OAuthV2> |
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 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<ProxyEndpoint name="default"> | ||
<Description/> | ||
<FaultRules/> | ||
<PreFlow name="PreFlow"> | ||
<Request> | ||
<Step> | ||
<Name>verify-oauth-v2-access-token</Name> | ||
</Step> | ||
<Step> | ||
<Name>remove-header-authorization</Name> | ||
</Step> | ||
</Request> | ||
<Response/> | ||
</PreFlow> | ||
<PostFlow name="PostFlow"> | ||
<Request/> | ||
<Response/> | ||
</PostFlow> | ||
<Flows/> | ||
<HTTPProxyConnection> | ||
<BasePath>/cachedemoapi</BasePath> | ||
<Properties/> | ||
<VirtualHost>default</VirtualHost> | ||
</HTTPProxyConnection> | ||
<RouteRule name="default"> | ||
<TargetEndpoint>default</TargetEndpoint> | ||
</RouteRule> | ||
</ProxyEndpoint> |
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,56 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<TargetEndpoint name="default"> | ||
<Description/> | ||
<FaultRules> | ||
<!-- <FaultRule name="SC-Error"> | ||
<Condition>(calloutResponse.status.code=="401")</Condition> | ||
<Step> | ||
<Name>RedirectToAuthorize</Name> | ||
</Step> | ||
</FaultRule>--> | ||
</FaultRules> | ||
<PreFlow name="PreFlow"> | ||
<Request> | ||
<Step> | ||
<Name>GetCredentials</Name> | ||
</Step> | ||
<Step> | ||
<Name>CheckAccessTokenCache</Name> | ||
</Step> | ||
<Step> | ||
<Condition>external.oauth.cached.accessToken = null</Condition> | ||
<Name>BuildAccessTokenRequest</Name> | ||
</Step> | ||
<Step> | ||
<Condition>external.oauth.cached.accessToken = null</Condition> | ||
<Name>GetOAuthToken</Name> | ||
</Step> | ||
<Step> | ||
<Condition>external.oauth.cached.accessToken = null and OAuthAccessTokenResponse.status.code==200</Condition> | ||
<Name>ExtractAccessToken</Name> | ||
</Step> | ||
<Step> | ||
<Condition>external.oauth.cached.accessToken = null and OAuthAccessTokenResponse.status.code==200</Condition> | ||
<Name>SetAccessToken</Name> | ||
</Step> | ||
<Step> | ||
<Condition>external.oauth.cached.accessToken = null and OAuthAccessTokenResponse.status.code==200</Condition> | ||
<Name>SetAccessTokenCache</Name> | ||
</Step> | ||
<Step> | ||
<Condition>external.oauth.cached.accessToken != null</Condition> | ||
<Name>SetAccessTokenFromCache</Name> | ||
</Step> | ||
</Request> | ||
<Response/> | ||
</PreFlow> | ||
<PostFlow name="PostFlow"> | ||
<Request/> | ||
<Response/> | ||
</PostFlow> | ||
<Flows/> | ||
<HTTPTargetConnection> | ||
<Properties/> | ||
<URL>http://pamesh12-eval-test.apigee.net/externalapi</URL> | ||
</HTTPTargetConnection> | ||
</TargetEndpoint> |
Binary file not shown.
Oops, something went wrong.