Commit 7f3c9584 authored by Titouan Soulard's avatar Titouan Soulard

erp5_oauth2_authorisation: default `token_revision` to 0 in property sheet

parent 08da6b94
......@@ -1200,11 +1200,7 @@ class OAuth2AuthorisationServerConnector(XMLObject):
}
if request.client.erp5_client_value.isRefreshTokenSingleUse():
refresh_token_revision = session_value.getRefreshTokenRevision()
if refresh_token_revision is None:
refresh_token_revision = 1
else:
refresh_token_revision += 1
refresh_token_revision = session_value.getRefreshTokenRevision() + 1
session_value.setRefreshTokenRevision(refresh_token_revision)
jwt_payload[JWT_PAYLOAD_REFRESH_TOKEN_REVISION_KEY] = refresh_token_revision
......
......@@ -24,6 +24,10 @@
<key> <string>id</string> </key>
<value> <string>refresh_token_revision_property</string> </value>
</item>
<item>
<key> <string>property_default</string> </key>
<value> <string>python: 0</string> </value>
</item>
</dictionary>
</pickle>
</record>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment