Setting ReUseRefreshToken attribute value depending on API product custom attributes

Not applicable

Is there a way to set ReUseRefreshToken attribute(true or flase) value in the Oauth policy bdepending on API product custom attributes.

<ReuseRefreshToken >verifyapikey.VerifyClient.apiproduct.tokenReuse</ReuseRefreshToken>.

<ReuseRefreshToken ref="verifyapikey.VerifyClient.apiproduct.tokenReuse"/> ,these options did not work

Solved Solved
0 2 183
1 ACCEPTED SOLUTION

Hi @Sampath Ayitha

Unfortunately it cannot be referenced. The easiest is to have two OAuth policies with true and false. Have a condition in your Proxy flow and call it appropriately.

<Step>
  <Name>RefreshAccessToken-Reuse</Name>
  <Condition>verifyapikey.VerifyClient.apiproduct.tokenReuse = true</Condition>
</Step>
<Step>
  <Name>RefreshAccessToken</Name>
  <Condition>verifyapikey.VerifyClient.apiproduct.tokenReuse = false</Condition>
</Step>

View solution in original post

2 REPLIES 2

Hi @Sampath Ayitha

Unfortunately it cannot be referenced. The easiest is to have two OAuth policies with true and false. Have a condition in your Proxy flow and call it appropriately.

<Step>
  <Name>RefreshAccessToken-Reuse</Name>
  <Condition>verifyapikey.VerifyClient.apiproduct.tokenReuse = true</Condition>
</Step>
<Step>
  <Name>RefreshAccessToken</Name>
  <Condition>verifyapikey.VerifyClient.apiproduct.tokenReuse = false</Condition>
</Step>

Thanks Sai for you reponse, the same thing we ended up doing. We thought that there would be a better way instead of using two policies.