Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rename
JWTAuth.authenticate_app_user()toJWTAuth.authenticate_user(), to reflect the fact that the newBox service accounts can authenticate as managed users as well
as app users.
JWTAuth.authenticate_app_user()is retained asan alias, for backwards-compatability.
Allow a user ID to be passed to
JWTAuth, instead of aUserobject. Previously, developers would need to import and manually
construct a
boxsdk.object.user.User, sinceClient.user()cannot be used until the
Clienthas been constructed (which isusually done after all authentication is complete).
Allow a user or user ID to be passed to the
JWTAuthconstructor. This way,
JWTAuth.authenticate_user()can becalled without any arguments. More importantly, this means that
JWTAuth.refresh()can be called immediately afterconstruction, with no need for a manual call to
JWTAuth.authenticate_user().When
auto_session_renewal=True, if there is no access token,then
BoxSession.request()will renew the token before makingthe request. This saves an API call. And combined with the
above, authentication for
JWTAuthobjects can be donecompletely automatically, at the time of first API call.
Document that the
enterprise_idargument toJWTAuthisallowed to be
None(and must beNoneifuseris passed).Also allow it to be passed to
authenticate_instance(), so thatit doesn't need to be provided at construction time.
Clean up the README.
Fixes #174.