Disable certain functionalities in RemoteOAuth2Mixin
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- api, authentication, security
Research direction
Start by reading RemoteOAuth2Mixin and DeveloperTokenAuth, then review the common-base proposal in issue #173. Resolve whether revoke() and the listed constructor options should be disabled or removed, and define the intended breaking-change behavior for the 2.0.0 release.
Written by the indexing model from the issue text.
Description
When using RemoteOAuth2Mixin, all /token calls are delegated to another process or server. Thus:
- The
client_idandclient_secretshouldn't be required. In fact, they perhaps shouldn't even be allowed to be passed. Clients that need to do remote auth should be discouraged from having any of their credentials hard-coded, especially since they aren't even needed. store_tokensshould perhaps be disallowed. Since the tokens are owned by the remote process, it should be in control of where its tokens go. If a client needs to restart, it should get its tokens from the remote process/server, not from its own token store.box_device_idandbox_device_nameare useless if we're not making/tokencalls.refresh_tokenshould never be available to the client, so it shouldn't be possible to pass this.
Also, since the remote process/server owns the tokens, we should possibly disable revoke(). If we do that, then:
- We definitely don't need
client_idandclient_secretanymore, since they would never be used. - For the same reason, we also don't need
network_layeranymore. - We might not need
refresh_lockanymore. Presumably, the remote server can handle its own locking, without the clients needing to coordinate.
revoke could be made to pass (DeveloperTokenAuth does this) or raise, and the unneeded constructor arguments can be passed as None to the super-class, so that TypeError is raised if a user tries passing any of them.
Alternatively, factor this into #173, and create a common base-class that doesn't have any of these functionalities.
This would be a breaking change, so consider this for 2.0.0.
- Dominant language
- Python
- Stars
- 460
- Forks
- 223
- Avg merge
- 14h 18m
- Merged PRs (30d)
- 21
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from box/box-python-sdk
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
box/box-python-sdk#196 ·
-
bug enhancement
box/box-python-sdk#1314 · 6 comments · 5 assignees ·
-
enhancement
box/box-python-sdk#1154 · 3 comments · 5 assignees ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
box/box-python-sdk#1155 · 1 comment · 4 reactions ·
-
enhancement
box/box-python-sdk#1157 · 1 comment · 6 assignees ·
All issues in box/box-python-sdk
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100