Refresh Token mechanism when APIGEE is a Consumer

Hello,

Apigee is a consumer and sends a request to OAuth Server with client_id+client_secret to get Access Token + Refresh Token
OAuth Server will send the access token(1hr) and refresh token(1 day) back to Apigee.
While we are sending requests to Resource Server, we send requests with an access token which is valid for 1 hr (using the cached response for the expiry of the token may be)And probably just before cache expiry (1 hr in this case), if I try to send a request with the same access token, it'd fail.
So, now I will send a request to OAuth Server with the refresh token (that was given to me in previous response) to get an Access token. 

How can I implement this automatic refreshing token mechanism along with first time access token fetch when APIGEE is a consumer?

Thanks

@kurtkanaskie @dchiesa1@Sai Saran Vaidyanathan@dknezic @ganadurai @Harish123 @shrenikkumar-s @Peeyush_Singhai 

Solved Solved
2 1 292
1 ACCEPTED SOLUTION

I think it's possible using 2 caches to hold:

  1. access_token in at_cache with it's expiry. i.e. The access_token entry is in the cache till it's valid.
  2. refresh_token in rt_cache with it's expiry (usually longer than access_token expiry). i.e. The refresh_token entry is in the cache till it's valid.

I've put the concept in a diagram (Refresh Token Mechanism.drawio XML is in the code snippet) and you may want to have the cache expired well before the token expires. i.e.

  • at_cache_expiry=expires_in-60 (seconds) for access_token
  • rt_cache_expiry=refresh_token_expires_in-60 (seconds) for refresh_token

In-case you don't have refresh_token_expires_in, check with your OAuth provider for a static value.

shrenikkumars_0-1688482651284.png

 

<mxfile host="app.diagrams.net" modified="2023-07-04T14:33:11.154Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" etag="99e93KrcOjQPWDYlt4F7" version="21.3.8" type="device">
  <diagram name="Page-1" id="HcdHm6qOB1Hw_3jJ9qRD">
    <mxGraphModel dx="1434" dy="764" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-1" target="6mMxMdS8GZMMX9tjjPcs-3">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-1" value="Start" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
          <mxGeometry x="130" y="130" width="100" height="70" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-7" value="access_token exists" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.44;entryY=-0.029;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-3" target="6mMxMdS8GZMMX9tjjPcs-5">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-9" value="&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;&quot;&gt;access_token doesn&#39;t exist&lt;/span&gt;" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-3" target="6mMxMdS8GZMMX9tjjPcs-8">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-3" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;Look for access_token in at_cache&lt;/font&gt;" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
          <mxGeometry x="130" y="240" width="100" height="90" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-5" value="End" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
          <mxGeometry x="710" y="600" width="100" height="70" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-11" value="refresh_token exists" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-8" target="6mMxMdS8GZMMX9tjjPcs-10">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-14" value="&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;&quot;&gt;refresh_token doesn&#39;t exist&lt;/span&gt;" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-8">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="414" y="435" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-8" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;Look for refresh_token in rt_cache&lt;/font&gt;" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
          <mxGeometry x="130" y="390" width="100" height="90" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-42" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=-0.01;entryY=0.68;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-10" target="6mMxMdS8GZMMX9tjjPcs-19">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-10" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;Call Auth API to get new access_token+refresh_token combination using the refresh_token found in the rt_cache&lt;/font&gt;" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
          <mxGeometry x="95" y="550" width="170" height="110" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-40" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-15" target="6mMxMdS8GZMMX9tjjPcs-16">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-15" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;Call Auth API to get new access_token+refresh_token combination using the client_credentials (client_id/client_secret combination from KVM)&lt;/font&gt;" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
          <mxGeometry x="414" y="380" width="170" height="110" as="geometry" />
        </mxCell>
        <object label="Perform" id="6mMxMdS8GZMMX9tjjPcs-16">
          <mxCell style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
            <mxGeometry x="354" y="550" width="290" height="200" as="geometry">
              <mxRectangle x="390" y="535" width="80" height="30" as="alternateBounds" />
            </mxGeometry>
          </mxCell>
        </object>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-17" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;1. Parse the response containing&amp;nbsp;access_token+refresh_token combination to get at &amp;amp; rt&lt;/font&gt;" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="6mMxMdS8GZMMX9tjjPcs-16">
          <mxGeometry y="30" width="290" height="40" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-18" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;2. Cache access_token into at_cache for it&#39;s expiry&lt;/font&gt;" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="6mMxMdS8GZMMX9tjjPcs-16">
          <mxGeometry y="70" width="290" height="30" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-19" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;3. Cache the refresh_token into rt_cache for it&#39;s expiry (usually longer than access_token expiry)&lt;/font&gt;" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="6mMxMdS8GZMMX9tjjPcs-16">
          <mxGeometry y="100" width="290" height="50" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-36" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;4. Use the access_token from the response [Authorization=Bearer &amp;lt;&amp;lt;access_token&amp;gt;&amp;gt;] to call the target&lt;/font&gt;" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="6mMxMdS8GZMMX9tjjPcs-16">
          <mxGeometry y="150" width="290" height="50" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-43" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-18" target="6mMxMdS8GZMMX9tjjPcs-5">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>

 

 

 

 

 

 



 

View solution in original post

1 REPLY 1

I think it's possible using 2 caches to hold:

  1. access_token in at_cache with it's expiry. i.e. The access_token entry is in the cache till it's valid.
  2. refresh_token in rt_cache with it's expiry (usually longer than access_token expiry). i.e. The refresh_token entry is in the cache till it's valid.

I've put the concept in a diagram (Refresh Token Mechanism.drawio XML is in the code snippet) and you may want to have the cache expired well before the token expires. i.e.

  • at_cache_expiry=expires_in-60 (seconds) for access_token
  • rt_cache_expiry=refresh_token_expires_in-60 (seconds) for refresh_token

In-case you don't have refresh_token_expires_in, check with your OAuth provider for a static value.

shrenikkumars_0-1688482651284.png

 

<mxfile host="app.diagrams.net" modified="2023-07-04T14:33:11.154Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" etag="99e93KrcOjQPWDYlt4F7" version="21.3.8" type="device">
  <diagram name="Page-1" id="HcdHm6qOB1Hw_3jJ9qRD">
    <mxGraphModel dx="1434" dy="764" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-1" target="6mMxMdS8GZMMX9tjjPcs-3">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-1" value="Start" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
          <mxGeometry x="130" y="130" width="100" height="70" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-7" value="access_token exists" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.44;entryY=-0.029;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-3" target="6mMxMdS8GZMMX9tjjPcs-5">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-9" value="&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;&quot;&gt;access_token doesn&#39;t exist&lt;/span&gt;" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-3" target="6mMxMdS8GZMMX9tjjPcs-8">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-3" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;Look for access_token in at_cache&lt;/font&gt;" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
          <mxGeometry x="130" y="240" width="100" height="90" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-5" value="End" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
          <mxGeometry x="710" y="600" width="100" height="70" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-11" value="refresh_token exists" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-8" target="6mMxMdS8GZMMX9tjjPcs-10">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-14" value="&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;&quot;&gt;refresh_token doesn&#39;t exist&lt;/span&gt;" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-8">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="414" y="435" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-8" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;Look for refresh_token in rt_cache&lt;/font&gt;" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
          <mxGeometry x="130" y="390" width="100" height="90" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-42" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=-0.01;entryY=0.68;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-10" target="6mMxMdS8GZMMX9tjjPcs-19">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-10" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;Call Auth API to get new access_token+refresh_token combination using the refresh_token found in the rt_cache&lt;/font&gt;" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
          <mxGeometry x="95" y="550" width="170" height="110" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-40" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-15" target="6mMxMdS8GZMMX9tjjPcs-16">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-15" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;Call Auth API to get new access_token+refresh_token combination using the client_credentials (client_id/client_secret combination from KVM)&lt;/font&gt;" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
          <mxGeometry x="414" y="380" width="170" height="110" as="geometry" />
        </mxCell>
        <object label="Perform" id="6mMxMdS8GZMMX9tjjPcs-16">
          <mxCell style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
            <mxGeometry x="354" y="550" width="290" height="200" as="geometry">
              <mxRectangle x="390" y="535" width="80" height="30" as="alternateBounds" />
            </mxGeometry>
          </mxCell>
        </object>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-17" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;1. Parse the response containing&amp;nbsp;access_token+refresh_token combination to get at &amp;amp; rt&lt;/font&gt;" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="6mMxMdS8GZMMX9tjjPcs-16">
          <mxGeometry y="30" width="290" height="40" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-18" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;2. Cache access_token into at_cache for it&#39;s expiry&lt;/font&gt;" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="6mMxMdS8GZMMX9tjjPcs-16">
          <mxGeometry y="70" width="290" height="30" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-19" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;3. Cache the refresh_token into rt_cache for it&#39;s expiry (usually longer than access_token expiry)&lt;/font&gt;" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="6mMxMdS8GZMMX9tjjPcs-16">
          <mxGeometry y="100" width="290" height="50" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-36" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;4. Use the access_token from the response [Authorization=Bearer &amp;lt;&amp;lt;access_token&amp;gt;&amp;gt;] to call the target&lt;/font&gt;" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="6mMxMdS8GZMMX9tjjPcs-16">
          <mxGeometry y="150" width="290" height="50" as="geometry" />
        </mxCell>
        <mxCell id="6mMxMdS8GZMMX9tjjPcs-43" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="6mMxMdS8GZMMX9tjjPcs-18" target="6mMxMdS8GZMMX9tjjPcs-5">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>