Disable certain functionalities in RemoteOAuth2Mixin
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- api, authentication, security
Hướng nghiên cứu
Bắt đầu bằng cách đọc RemoteOAuth2Mixin và DeveloperTokenAuth, sau đó xem xét đề xuất về lớp cơ sở dùng chung trong issue #173. Xác định liệu revoke() và các tùy chọn constructor được liệt kê nên bị vô hiệu hóa hay loại bỏ, đồng thời định nghĩa hành vi breaking change dự kiến cho bản phát hành 2.0.0.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 460
- Fork
- 223
- Merge trung bình
- 14 giờ 18 phút
- Pull request đã merge (30 ngày)
- 21
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của box/box-python-sdk
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
box/box-python-sdk#196 ·
-
bug enhancement
box/box-python-sdk#1314 · 6 bình luận · 5 người được giao ·
-
enhancement
box/box-python-sdk#1154 · 3 bình luận · 5 người được giao ·
-
Asynchronous IO Support Đang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
box/box-python-sdk#1155 · 1 bình luận · 4 reaction ·
-
enhancement
box/box-python-sdk#1157 · 1 bình luận · 6 người được giao ·
Tất cả issue của box/box-python-sdk
Issue tương tự
-
documentation help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
simonw/sqlite-utils#872 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100