syun64 commented on code in PR #466:
URL: https://github.com/apache/iceberg-python/pull/466#discussion_r1501297005


##########
pyiceberg/catalog/rest.py:
##########
@@ -157,7 +157,7 @@ class TokenResponse(IcebergBaseModel):
     access_token: str = Field()
     token_type: str = Field()
     expires_in: int = Field()
-    issued_token_type: str = Field()
+    issued_token_type: Optional[str] = None

Review Comment:
   Could we use this opportunity to align the OAuthTokenResponse exactly with 
the [model specified in the Iceberg Rest Catalog Open API 
Spec](https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml#L3120)?
   
   - we want to verify within the model that the **issued_token_type** is one 
of accepted types, if it is provided
   - the current model is missing Optional **scope** and **refresh_token**
   - also update **expires_in** to be Optional (expires_in is a recommended 
property in 
[OAuth](https://www.oauth.com/oauth2-servers/access-tokens/access-token-response/)
 and if it wasn't provided in the TokenResponse, it will fail for similar 
reasons in the existing model)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to