msgraph-sdk-java-auth icon indicating copy to clipboard operation
msgraph-sdk-java-auth copied to clipboard

Extend DefaultHttpProvider to auto-refresh token while handling ErrorResponse

Open zeeshan-v1 opened this issue 6 years ago • 2 comments

Expected behavior

Implementation of IHttpProvider class which gives the capability to handle Token Invalidation Errors within the class itself. Consider a Scenario, wherein you can pass RefreshToken to the HttpProvider Impl class during initialization. so that while handling the error response in 'handleErrorResponse' method , if an Invalid Token is detected, We could refresh the token and if successfull retry the request. This all abstracts the complexity of detecting the token expiry down the line and then having to recreate the api request What do you guys think?

Actual behavior

Steps to reproduce the behavior

AB#7120

zeeshan-v1 avatar Jun 12 '19 15:06 zeeshan-v1

Hi, @zeeshan-v1 Thanks for creating this issue, these scenarios are taken care by auth library. We will look into meeting your requirement in our auth library - https://github.com/microsoftgraph/msgraph-sdk-java-auth

NakulSabharwal avatar Jun 18 '19 05:06 NakulSabharwal

Hi @zeeshan-v1 Thanks for reaching out and for the patience. With the release of the v3 of the java SDK, it now integrates with Azure Identity which supports a wide variety of authentication flows out of the box. We strongly encourage you to migrate to this v3 + azure identity, and you can read more about it in this issue. https://github.com/microsoftgraph/msgraph-sdk-java/issues/628

This issue won't be fixed, but I'll leave it open for visibility, and the repository will be archived soon.

baywet avatar Mar 16 '21 12:03 baywet